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

📄 mframe.java~4~

📁 模拟工作流的代码
💻 JAVA~4~
字号:
package wsfsimulator;import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.border.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: 中兴通讯股份有限公司</p> * @author 陈粤 * @version 1.0 */public class MFrame extends JFrame {  JPanel contentPane;  JLabel jLabel1 = new JLabel();  JTextField jTextField1 = new JTextField();  GridLayout gridLayout1 = new GridLayout();  JLabel jLabel2 = new JLabel();  JTextField jTextField2 = new JTextField();  Border border1;  JLabel jLabel3 = new JLabel();  JLabel jLabel4 = new JLabel();  //Construct the frame  public MFrame() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    contentPane = (JPanel) this.getContentPane();    border1 = BorderFactory.createEmptyBorder(30,30,30,30);    jLabel1.setText("消息数目");    contentPane.setLayout(gridLayout1);    this.setSize(new Dimension(400, 160));    this.setTitle("WsfSimulator");    gridLayout1.setColumns(3);    gridLayout1.setHgap(3);    gridLayout1.setRows(3);    gridLayout1.setVgap(3);    contentPane.setBorder(border1);    jLabel4.setText("处理能力(条/秒)");    jLabel2.setText("");    jLabel3.setText("");    jTextField1.setText("");    jTextField2.setToolTipText("");    jTextField2.setText("0");    contentPane.add(jLabel1, null);    contentPane.add(jTextField1, null);    contentPane.add(jLabel2, null);    contentPane.add(jLabel3, null);    contentPane.add(jLabel4, null);    contentPane.add(jTextField2, null);  }  //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 + -