import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;
public class JFramDemo extends JFrame{
private static final long serialVersionUID = 1L;
public JFramDemo(){
Toolkit tk=Toolkit.getDefaultToolkit();//不太理解~~~~~~~~~~~
Dimension d=tk.getScreenSize();//不太理解~~~~~~~~~~~
this.setLocation(d.width/3,d.height/3);
this.setSize(d.width/3,d.height/3);
this.setTitle("我的第一个登陆界面");
this.setIconImage(tk.getImage("images/bug1.png"));
this.setResizable(false);
this.setVisible(true);
}
public static void main(String[] args) {
new JFrameDemo();
}
}
望远
相关分类