shanframe.java~1~

来自「cs结构的一个公交车系统好有使用价值啊下吧--- --- ---」· JAVA~1~ 代码 · 共 51 行

JAVA~1~
51
字号
package bus;import javax.swing.*;import java.awt.*;public class ShanFrame extends JFrame implements Runnable{  ShanFrame()  {    Container ct=this.getContentPane();    ct.setBackground(Color.cyan);    this.setSize(300,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 + =
减小字号Ctrl + -
显示快捷键?