📄 shanframe.java
字号:
package bus;import javax.swing.*;import java.awt.*;public class ShanFrame extends JFrame implements Runnable{ JLabel jLabel1 = new JLabel(new ImageIcon("shanping.jpg")); ShanFrame() { Container ct=this.getContentPane(); ct.add(jLabel1); this.setSize(350,200); double w=Toolkit.getDefaultToolkit().getScreenSize().getWidth(); double h=Toolkit.getDefaultToolkit().getScreenSize().getHeight(); int x=(int)(w-this.getWidth())/2; int y=(int)(h-this.getHeight())/2; this.setLocation(x,y); this.setUndecorated(true); this.show(); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } public void run() { try { Thread.currentThread().sleep(3000); } catch (InterruptedException ex) { ex.printStackTrace(); } this.dispose(); new Login(); } public static void main(String[] arg) { new Thread(new ShanFrame()).start(); } private void jbInit() throws Exception { this.setEnabled(false); this.setResizable(false); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -