frmc.java

来自「关于并行计算服务器客户端与服务器端」· Java 代码 · 共 43 行

JAVA
43
字号
//package Matrix;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class FrmC
      extends JFrame
      implements ActionListener {
    public JTextArea console = new JTextArea("客户端运行状态信息......\n");
    JPanel jPanel1 = new JPanel();
    BorderLayout borderLayout1 = new BorderLayout();
    JPanel jPanel2 = new JPanel();
    JButton okButton = new JButton();
    JScrollPane jScrollPane = new JScrollPane();

    public FrmC() {
        setSize(300, 400);
        setLocation(300, 200);

        jPanel1.setLayout(borderLayout1);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setTitle("客户端");
        okButton.setText("开始计算");
        okButton.addActionListener(this);

        jPanel2.add(okButton, new FlowLayout());
        jPanel1.add(jPanel2, BorderLayout.NORTH);
        jScrollPane.getViewport().add(console);
        jPanel1.add(jScrollPane, BorderLayout.CENTER);

        this.getContentPane().add(jPanel1, BorderLayout.CENTER);
    }

    public void actionPerformed(ActionEvent e) {
        new Netc(console);
    }

    public static void main(String[] args) {
        FrmC frmC = new FrmC();
        frmC.show();
    }
}

⌨️ 快捷键说明

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