java写界面_java能不能直接做界面窗口
展開全部
可以的,一個簡單32313133353236313431303231363533e78988e69d8331333337626135的界面public?test_03(){
init();
}
public?void?init(){
JLabel?jl_1=new?JLabel("用戶名");
JLabel?jl_2=new?JLabel("密碼");
JTextField?jtf=new?JTextField();
JPasswordField?jpf=new?JPasswordField();
JButton?button_1=new?JButton("確定");
JPanel?panel=new?JPanel();
panel.setLayout(null);
jl_1.setBounds(30,?50,?50,?30);
jl_2.setBounds(30,90,50,30);
jtf.setBounds(100,?50,?100,?30);
jpf.setBounds(100,?90,?100,?30);
button_1.setBounds(110,?130,?80,?30);
panel.add(jl_1);
panel.add(jl_2);
panel.add(jtf);
panel.add(jpf);
panel.add(button_1);
this.add(panel);
this.setSize(300,?250);
this.setLocation(400,?300);
this.setVisible(true);
}
public?static?void?main(String[]?args)?{
new?test_03();
}
總結
以上是生活随笔為你收集整理的java写界面_java能不能直接做界面窗口的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 中文名称:案例编程MOOK系列
- 下一篇: Symbian编程VC开发环境设置