📄 splashwindow.java
字号:
/*
* SplashWindow.java
*
* Created on 2006年5月13日, 下午3:16
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package media;
import java.awt.*;
import javax.swing.*;
/**
*
* @author freezing
*/
public class SplashWindow extends JWindow{
/** Creates a new instance of SplashWindow */
private JLabel centerLabel;
private Container c;
private boolean stop;
public SplashWindow()
{
stop=false;
c=this.getContentPane();
centerLabel=new JLabel(new ImageIcon("Image\\splash.jpg"));
c.add(centerLabel,BorderLayout.CENTER);
java.awt.Dimension screenSize =Toolkit.getDefaultToolkit().getScreenSize();
java.awt.Dimension labelSize = centerLabel.getPreferredSize();
setLocation(screenSize.width/2 - (labelSize.width/2), screenSize.height/2 - (labelSize.height/2));
pack();
setVisible(true);
doRun();
}
public void doRun()
{
try
{
Thread.sleep(7000);
stop=true;
}
catch(Exception e)
{
e.printStackTrace();
}
}
public boolean isFinished()
{
return stop;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -