⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userlogon.java~2~

📁 局域网聊天系统
💻 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 + -