資源簡介
這是我用eclipse編的,eclipse有一個插件,做界面很方便,自己在網上搜
代碼片段和文件信息
import?java.awt.event.FocusAdapter;
import?javax.swing.*;
/**
*?This?code?was?edited?or?generated?using?CloudGarden‘s?Jigloo
*?SWT/Swing?GUI?Builder?which?is?free?for?non-commercial
*?use.?If?Jigloo?is?being?used?commercially?(ie?by?a?corporation
*?company?or?business?for?any?purpose?whatever)?then?you
*?should?purchase?a?license?for?each?developer?using?Jigloo.
*?Please?visit?www.cloudgarden.com?for?details.
*?Use?of?Jigloo?implies?acceptance?of?these?licensing?terms.
*?A?COMMERCIAL?LICENSE?HAS?NOT?BEEN?PURCHASED?FOR
*?THIS?MACHINE?SO?JIGLOO?OR?THIS?CODE?CANNOT?BE?USED
*?LEGALLY?FOR?ANY?CORPORATE?OR?COMMERCIAL?PURPOSE.
*/
public?class?Login?extends?javax.swing.Jframe?{
private?JLabel?lbl_userName;
private?JButton?btn_ok;
private?JButton?btn_col;
private?JLabel?lbl_welcom;
private?JPasswordField?jpf_password;
private?JLabel?lbl_password;
private?JTextField?jtf_userName;
{
//Set?Look?&?Feel
try?{
javax.swing.UIManager.setLookAndFeel(“javax.swing.plaf.metal.metalLookAndFeel“);
}?catch(Exception?e)?{
e.printStackTrace();
}
}
/**
*?Auto-generated?main?method?to?display?this?Jframe
*/
public?static?void?main(String[]?args)?{
SwingUtilities.invokeLater(new?Runnable()?{
public?void?run()?{
Login?inst?=?new?Login();
inst.setLocationRelativeTo(null);
inst.setVisible(true);
}
});
}
public?Login()?{
super();
initGUI();
}
private?void?initGUI()?{
try?{
getContentPane().setLayout(null);
setDefaultCloseOperation(Wind
- 上一篇:java秒殺程序(附帶數據庫-mysql)
- 下一篇:java 異常總結
評論
共有 條評論