?? face.java~150~
字號:
package course;
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Rectangle;
import java.awt.Font;
import java.awt.Color;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JCheckBox;
import javax.swing.JButton;
import javax.swing.JTextArea;
import javax.swing.BorderFactory;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import java.awt.SystemColor;
import javax.swing.UIManager;
import javax.swing.border.TitledBorder;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Face extends JFrame {
public static int n;
Topological top = new Topological();
Adjacency ad = new Adjacency();
public static int aa[][] = new int[n + 1][n + 1];
public static String a[];
public static String b[];
public static String chongfu = "", chongfu1 = "";
JPanel contentPane;
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JTextField jTextField1 = new JTextField();
JComboBox jComboBox1 = new JComboBox();
JComboBox jComboBox2 = new JComboBox();
JComboBox jComboBox3 = new JComboBox();
JLabel jLabel4 = new JLabel();
JCheckBox jCheckBox1 = new JCheckBox();
JButton jButton1 = new JButton();
JButton jButton3 = new JButton();
JTextArea jTextArea1 = new JTextArea();
JTextArea jTextArea2 = new JTextArea();
JTextArea jTextArea3 = new JTextArea();
JTextArea jTextArea4 = new JTextArea();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JLabel jLabel7 = new JLabel();
JLabel jLabel8 = new JLabel();
JButton jButton4 = new JButton();
JButton jButton5 = new JButton();
JButton jButton6 = new JButton();
JButton jButton7 = new JButton();
public Face() {
try {
setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
/**
* Component initialization.
*
* @throws java.lang.Exception
*/
private void jbInit() throws Exception {
titledBorder2 = new TitledBorder("課程設(shè)定");
titledBorder1 = new TitledBorder("課表顯示");
contentPane = (JPanel) getContentPane();
contentPane.setLayout(null);
setSize(new Dimension(525, 636));
setTitle("Frame Title");
jLabel1.setFont(new java.awt.Font("宋體", Font.BOLD, 18));
jLabel1.setForeground(Color.red);
jLabel1.setText("排課表");
jLabel1.setBounds(new Rectangle(220, 14, 73, 28));
jLabel2.setText("添加課程:");
jLabel2.setBounds(new Rectangle(35, 100, 77, 25));
jLabel3.setText("選課的數(shù)量:");
jLabel3.setBounds(new Rectangle(35, 65, 90, 25));
jTextField1.setBounds(new Rectangle(148, 66, 148, 22));
jComboBox1.setBounds(new Rectangle(33, 165, 145, 22));
jComboBox2.setBounds(new Rectangle(299, 165, 145, 22));
jLabel4.setText("選擇科目,并確定先行級:");
jLabel4.setBounds(new Rectangle(31, 137, 153, 21));
jCheckBox1.setText("先行課");
jCheckBox1.setBounds(new Rectangle(182, 165, 80, 21));
jButton1.setBounds(new Rectangle(79, 200, 69, 24));
jButton1.setText("設(shè)定");
jButton1.addActionListener(new Face_jButton1_actionAdapter(this));
jButton3.setBounds(new Rectangle(320, 200, 69, 24));
jButton3.setText("查看");
jButton3.addActionListener(new Face_jButton3_actionAdapter(this));
jTextArea1.setBorder(BorderFactory.createLineBorder(Color.black));
jTextArea2.setBorder(BorderFactory.createLineBorder(Color.black));
jTextArea3.setBorder(BorderFactory.createLineBorder(Color.black));
jTextArea4.setBorder(BorderFactory.createLineBorder(Color.black));
jLabel5.setText("第一學(xué)期");
jLabel5.setBounds(new Rectangle(35, 254, 66, 15));
jLabel6.setText("第二學(xué)期");
jLabel6.setBounds(new Rectangle(169, 254, 66, 15));
jLabel7.setText("第三學(xué)期");
jLabel7.setBounds(new Rectangle(295, 254, 66, 15));
jLabel8.setText("第四學(xué)期");
jLabel8.setBounds(new Rectangle(413, 255, 66, 15));
jButton4.setBounds(new Rectangle(168, 595, 73, 23));
jButton4.setText("課表");
jButton4.addActionListener(new Face_jButton4_actionAdapter(this));
jButton5.setBounds(new Rectangle(294, 596, 73, 23));
jButton5.setText("退出");
jButton5.addActionListener(new Face_jButton5_actionAdapter(this));
jButton6.setBounds(new Rectangle(326, 101, 70, 23));
jButton6.setText("添加");
jButton6.addActionListener(new Face_jButton6_actionAdapter(this));
jButton7.setBounds(new Rectangle(326, 62, 70, 23));
jButton7.setText("確定");
jButton7.addActionListener(new Face_jButton7_actionAdapter(this));
jComboBox3.setBounds(new Rectangle(148, 102, 148, 22));
contentPane.setBackground(UIManager.getColor(
"CheckBoxMenuItem.selectionBackground"));
jLabel9.setBackground(Color.gray);
jLabel9.setBorder(titledBorder1);
jLabel9.setBounds(new Rectangle(9, 229, 512, 394));
jLabel10.setBorder(titledBorder2);
jLabel10.setBounds(new Rectangle(8, 42, 508, 193));
jScrollPane1.setBounds(new Rectangle(13, 270, 121, 146));
jScrollPane2.setBounds(new Rectangle(140, 268, 121, 146));
jScrollPane3.setBounds(new Rectangle(268, 268, 121, 146));
jScrollPane4.setBounds(new Rectangle(395, 268, 121, 146));
jScrollPane5.setBounds(new Rectangle(13, 443, 121, 151));
jScrollPane6.setBounds(new Rectangle(141, 443, 121, 151));
jScrollPane7.setBounds(new Rectangle(269, 443, 121, 151));
jScrollPane8.setBounds(new Rectangle(397, 443, 121, 151));
jLabel11.setText("第五學(xué)期");
jLabel11.setBounds(new Rectangle(34, 421, 82, 20));
jLabel12.setText("第六學(xué)期");
jLabel12.setBounds(new Rectangle(169, 421, 58, 22));
jLabel13.setText("第七學(xué)期");
jLabel13.setBounds(new Rectangle(294, 421, 80, 20));
jLabel14.setText("第八學(xué)期");
jLabel14.setBounds(new Rectangle(413, 420, 68, 20));
jTextArea5.setBorder(BorderFactory.createLineBorder(Color.black));
jTextArea6.setBorder(BorderFactory.createLineBorder(Color.black));
jTextArea7.setBorder(BorderFactory.createLineBorder(Color.black));
jTextArea8.setBorder(BorderFactory.createLineBorder(Color.black));
contentPane.add(jLabel1);
contentPane.add(jLabel4);
contentPane.add(jComboBox1);
contentPane.add(jCheckBox1);
contentPane.add(jComboBox2);
contentPane.add(jButton1);
contentPane.add(jButton3);
contentPane.add(jLabel5);
contentPane.add(jLabel6);
contentPane.add(jLabel7);
contentPane.add(jLabel8);
contentPane.add(jLabel2);
contentPane.add(jTextField1);
contentPane.add(jLabel3);
contentPane.add(jButton7);
contentPane.add(jButton6);
contentPane.add(jComboBox3);
contentPane.add(jLabel10);
contentPane.add(jScrollPane1);
contentPane.add(jLabel9);
contentPane.add(jScrollPane2);
contentPane.add(jScrollPane3);
jScrollPane3.getViewport().add(jTextArea3);
contentPane.add(jScrollPane4);
jScrollPane4.getViewport().add(jTextArea4);
contentPane.add(jScrollPane5);
jScrollPane5.getViewport().add(jTextArea5);
contentPane.add(jScrollPane6);
jScrollPane6.getViewport().add(jTextArea6);
contentPane.add(jScrollPane7);
jScrollPane7.getViewport().add(jTextArea7);
contentPane.add(jScrollPane8);
contentPane.add(jLabel11);
contentPane.add(jLabel12);
contentPane.add(jLabel13);
contentPane.add(jLabel14);
contentPane.add(jButton4);
contentPane.add(jButton5);
jScrollPane8.getViewport().add(jTextArea8);
jScrollPane2.getViewport().add(jTextArea2);
jScrollPane1.getViewport().add(jTextArea1);
jComboBox3.addItem("(1)高等數(shù)學(xué)");
jComboBox3.addItem("(2)線性代數(shù)");
jComboBox3.addItem("(3)JAVA程序設(shè)計");
jComboBox3.addItem("(4)計算機(jī)引論");
jComboBox3.addItem("(5)LINUX");
jComboBox3.addItem("(6)數(shù)據(jù)結(jié)構(gòu)");
jComboBox3.addItem("(7)操作系統(tǒng)");
jComboBox3.addItem("(8)數(shù)據(jù)庫系統(tǒng)");
jComboBox3.addItem("(9)鄧小平理論");
jComboBox3.addItem("(10)數(shù)據(jù)庫課程設(shè)計");
jComboBox3.addItem("(11)微機(jī)原理與接口");
jComboBox3.addItem("(12)大學(xué)英語");
jComboBox3.addItem("(13)數(shù)值分析");
jComboBox3.addItem("(14)計算機(jī)組成原理");
jComboBox3.addItem("(15)體育");
jComboBox3.addItem("(16)中華民族歷史與精神");
jComboBox3.addItem("(17)傳統(tǒng)文學(xué)修養(yǎng)");
jComboBox3.addItem("(18)軍事理論");
jComboBox3.addItem("(19)馬克思主義哲學(xué)");
jComboBox3.addItem("(20)馬克思主義政治經(jīng)濟(jì)學(xué)");
jComboBox3.addItem("(21)思想道德修養(yǎng)");
jComboBox3.addItem("(22)法律基礎(chǔ)");
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -