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

📄 frame2.java~1~

📁 用java实现的一个c/s结构的网络聊天器
💻 JAVA~1~
字号:
package chatclient;import java.awt.*;import java.awt.event.*;import javax.swing.*;import com.borland.jbcl.layout.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class Frame2 extends JFrame {  JPanel contentPane;  XYLayout xYLayout1 = new XYLayout();  JPanel jPanel1 = new JPanel();  XYLayout xYLayout2 = new XYLayout();  JPanel jPanel2 = new JPanel();  XYLayout xYLayout3 = new XYLayout();  JButton jButton1 = new JButton();  JButton jButton2 = new JButton();  JTextField jTextField1 = new JTextField();  JTextField jTextField2 = new JTextField();  //Construct the frame  public Frame2() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    contentPane = (JPanel) this.getContentPane();    contentPane.setLayout(xYLayout1);    this.setSize(new Dimension(400, 300));    this.setTitle("Frame Title");    jPanel1.setLayout(xYLayout2);    jPanel2.setLayout(xYLayout3);    jButton1.setText("jButton1");    jButton2.setText("jButton2");    jTextField1.setText("jTextField1");    jTextField2.setText("jTextField2");    contentPane.add(jPanel2,        new XYConstraints(26, 105, 368, 89));    contentPane.add(jPanel1, new XYConstraints(3, 6, 392, 91));    contentPane.add(jButton1, new XYConstraints(318, 211, -1, -1));    contentPane.add(jButton2, new XYConstraints(320, 245, -1, -1));    contentPane.add(jTextField1,  new XYConstraints(18, 219, 267, 24));    contentPane.add(jTextField2,  new XYConstraints(15, 254, 290, 23));  }  //Overridden so we can exit when window is closed  protected void processWindowEvent(WindowEvent e) {    super.processWindowEvent(e);    if (e.getID() == WindowEvent.WINDOW_CLOSING) {      System.exit(0);    }  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -