如何实现“在启动程序的时候,先显示一张图片,几秒种后自动消失,再显示Frame”的功能。 请高手指点,不胜感激! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.blogjava.net/sunfruit/archive/2006/02/19/31556.html public class SplashWindow{ JWindow splashScreen; JLabel splashLabel;//////////////////////////////////////////////////////////////////////////////////显示Logo标志//////////////////////////////////////////////////////////////////////////////// public void showSplashScreen() { splashLabel = new JLabel(new ImageIcon("Logo.jpg")); splashScreen = new JWindow(); splashScreen.getContentPane().setLayout(new BorderLayout()); splashScreen.getContentPane().add(splashLabel,BorderLayout.CENTER); splashScreen.pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); splashScreen.setLocation(screenSize.width/2 - splashScreen.getSize().width/2, screenSize.height/2 - splashScreen.getSize().height/2); splashScreen.setVisible(true); }//////////////////////////////////////////////////////////////////////////////////隐藏Logo标志//////////////////////////////////////////////////////////////////////////////// public void hideSplashScreen() { splashScreen.dispose(); splashScreen = null; splashLabel = null; } public static void main(String[] args){ SplashWindow w = new SplashWindow(); w.showSplashScreen(); //w.hideSplashScreen(); }} 关于算数字二进制中1和字符顺序 关于包导入问题 index.jsp中文无乱码,但1在index_jsp.java里调试后就有乱码了? 关于Hashtable的顺序的问题?************************* 关于关闭窗口的程序 小问题,JDK是不是装J2SE或J2EE才有的装? 关于JAVA和C/C++通过socket发送和接受数据的问题 请教HTTP协议三次握手的命令字,谢谢!!! 怎样用javascript编程实现文件下载功能? JAVA中的问题,求解答 java 关于二进制数据的处理 急啊 jtable如何绑定数据库
JWindow splashScreen;
JLabel splashLabel;
////////////////////////////////////////////////////////////////////////////////
//显示Logo标志
////////////////////////////////////////////////////////////////////////////////
public void showSplashScreen()
{
splashLabel = new JLabel(new ImageIcon("Logo.jpg"));
splashScreen = new JWindow();
splashScreen.getContentPane().setLayout(new BorderLayout());
splashScreen.getContentPane().add(splashLabel,BorderLayout.CENTER);
splashScreen.pack();
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
splashScreen.setLocation(screenSize.width/2 - splashScreen.getSize().width/2,
screenSize.height/2 - splashScreen.getSize().height/2);
splashScreen.setVisible(true);
}////////////////////////////////////////////////////////////////////////////////
//隐藏Logo标志
////////////////////////////////////////////////////////////////////////////////
public void hideSplashScreen()
{
splashScreen.dispose();
splashScreen = null;
splashLabel = null;
} public static void main(String[] args){
SplashWindow w = new SplashWindow();
w.showSplashScreen();
//w.hideSplashScreen();
}
}