import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
import java.awt.FlowLayout;
import java.io.*;
public class MainFrame extends JFrame {
/**
* @param args
*/
JLabel Lab1,Lab2,Lab3,Lab4,Lab5,Lab6,Lab7;
JTextField Tex1,Tex2,Tex3,Tex4,Tex5;
JComboBox Comb1,Comb2,Comb3;
JButton Btn1,Btn2,Btn3;
JFrame frame=new JFrame("矩阵计算器");
JPanel panel;
public void mainframe()
{
Container cont=getContentPane();
cont.setLayout(new FlowLayout());
cont.setBackground(Color.blue);
String names1[]={"单目运算","双目运算","解线性方程(只有一解)"};
Lab1=new JLabel("矩阵计算器");
cont.add(Lab1);
Lab1.setBounds(300,20,400,40);
Lab2=new JLabel("请选择你要进行的矩阵运算:");
cont.add(Lab2);
Lab2.setBounds(30,60,400,40);
Comb1=new JComboBox(names1);
cont.add(Comb1);
Lab3=new JLabel("行");
cont.add(Lab3);
setVisible(true);
setSize(800, 600);
setLocation(300,20);
}
public static void main(String[] args) {
MainFrame a=new MainFrame();
a.mainframe();
}
}
慕姐8265434
红颜莎娜
扬帆大鱼
相关分类