import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import java.util.Random;
public class JmCalculate extends Frame implements ActionListener {
private static int WIDTH = 250;
private static int HEIGHT = 320;
Box baseBox, boxV1, boxV2;
//
界面中的容器
TextField
Txishu,
Tzhishu,
Tshangxian,
Txiaxian,
Tjingquezhi,
Tcishu,
Tmengzhi,Tgjqmengzhi;
//
界面中的输入框
Button b;
//
确定按钮
/*
*
构造函数
*/
JmCalculate() {
JPanel mainPanel = new JPanel();
setLayout(new BoxLayout(mainPanel, BoxLayout.X_AXIS));
/*
输入框名赋值
*/
boxV1 = Box.createV
erticalBox();
boxV1.add(Box.createV
erticalStrut(8));
boxV1.add(new Label("
系数
"));
boxV1.add(Box.createV
erticalStrut(8));
boxV1.add(new Label("
指数
"));
boxV1.add(Box.createV
erticalStrut(8));
boxV1.add(new Label("
上限
"));
boxV1.add(Box.createV
erticalStrut(8));
boxV1.add(new Label("
下限
"));
boxV1.add(Box.createV
erticalStrut(8));
boxV1.add(new Label("
精确值
"));
boxV1.add(Box.createV
erticalStrut(8));
boxV1.add(new Label("
次数
"));
boxV1.add(Box.createV
erticalStrut(8));
boxV1.add(new Label("
蒙特卡洛值
"));
boxV1.add(Box.createV
erticalStrut(8));