java 关于界面设计

来源:百度知道 编辑:UC知道 时间:2024/05/16 17:42:50
一些重要的方法

setSize(宽,高);
setBound(x,y,宽,高);
setVisible(true); //显示窗口
setLayout();
add();
setResizable();
setBorderPainted();
getContentPane();
dispose();
exit(0);
setMnemonic('');
setFont(f);
setForeground(Color.);
setEchoChar('');

JFrame中的setLayout() 用来设置布局管理器的。
常用的布局管理器 BorderLayout,GridLayout,具体的可以查一下api