?? userlogon.java~2~
字號:
package com.soft.QQ;
import java.awt.*;
import javax.swing.*;
import java.awt.BorderLayout;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class UserLogon
extends JFrame {
JPanel contentPane;
XYLayout xYLayout1 = new XYLayout();
JLabel la1 = new JLabel();
JTextField tf1 = new JTextField();
JLabel la2 = new JLabel();
JTextField tf2 = new JTextField();
JButton button1 = new JButton();
JButton button2 = new JButton();
public UserLogon() {
try {
setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
}
catch (Exception exception) {
exception.printStackTrace();
}
}
/**
* Component initialization.
*
* @throws java.lang.Exception
*/
private void jbInit() throws Exception {
contentPane = (JPanel) getContentPane();
contentPane.setLayout(xYLayout1);
setSize(new Dimension(400, 300));
setTitle("用戶登入");
la1.setText("用戶昵稱");
la2.setText("服務器IP");
tf2.setText("127.0.0.1");
button1.setText("登入");
button2.setText("重置");
button2.addActionListener(new UserLogon_button2_actionAdapter(this));
contentPane.setBackground(Color.cyan);
contentPane.add(la1, new XYConstraints(27, 43, 120, 36));
contentPane.add(tf1, new XYConstraints(156, 42, 155, 36));
contentPane.add(la2, new XYConstraints(25, 109, 121, 38));
contentPane.add(tf2, new XYConstraints(155, 108, 155, 34));
contentPane.add(button1, new XYConstraints(83, 190, 97, 33));
contentPane.add(button2, new XYConstraints(216, 187, 86, 33));
}
public void button2_actionPerformed(ActionEvent e) {
tf1.setText(null);
tf2.setText(null);
}
}
class UserLogon_button2_actionAdapter
implements ActionListener {
private UserLogon adaptee;
UserLogon_button2_actionAdapter(UserLogon adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.button2_actionPerformed(e);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -