📄 clientframe.java~11~
字号:
package Frame;
import java.net.Socket;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import java.awt.Rectangle;
import javax.swing.JTextField;
import javax.swing.JButton;
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
*/
class ClientFrame extends javax.swing.JFrame {
public ClientFrame() {
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
}
}
public static void main(String[] args) {
ClientFrame clientframe = new ClientFrame();
}
void ClientFrame(){
}
private void jbInit() throws Exception {
this.getContentPane().setLayout(null);
jLabel1.setText("输入主机IP地址");
jLabel1.setBounds(new Rectangle(14, 27, 90, 24));
jLabel2.setText("姓 名");
jLabel2.setBounds(new Rectangle(14, 49, 90, 24));
UserName.setBounds(new Rectangle(103, 50, 144, 22));
TrueButon.setBounds(new Rectangle(31, 87, 116, 25));
TrueButon.setText("确 定");
TrueButon.addActionListener(new TrueButon_actionAdapter(this));
ExitButton.setBounds(new Rectangle(203, 87, 116, 25));
ExitButton.setText("退 出");
this.getContentPane().add(jLabel1);
TestButton.setBounds(new Rectangle(265, 27, 84, 23));
TestButton.setText("测 试");
this.getContentPane().add(HostIPText);
this.getContentPane().add(TestButton);
this.getContentPane().add(jLabel2);
this.getContentPane().add(UserName);
this.getContentPane().add(TrueButon);
this.getContentPane().add(ExitButton);
HostIPText.setBounds(new Rectangle(103, 27, 144, 23));
}
JLabel jLabel1 = new JLabel();
JTextField HostIPText = new JTextField();
JButton TestButton = new JButton();
JLabel jLabel2 = new JLabel();
JTextField UserName = new JTextField();
JButton TrueButon = new JButton();
JButton ExitButton = new JButton();
}
//
class TrueButon_actionAdapter implements ActionListener {
private MainFrame adaptee;
TrueButon_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
//
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -