MainFrame.java~140~
资源名称:Java.rar [点击查看]
上传用户:liming9091
上传日期:2014-10-27
资源大小:3376k
文件大小:34k
源码类别:
Java编程
开发平台:
Java
- package stumanage;
- import javax.swing.*;
- import javax.swing.plaf.*;
- import com.borland.dbswing.*;
- import java.awt.*;
- import com.borland.jbcl.layout.*;
- import com.borland.dx.sql.dataset.*;
- import com.borland.dx.dataset.*;
- import java.awt.event.*;
- /**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) 2003</p>
- * <p>Company: </p>
- * @author not attributable
- * @version 1.0
- */
- public class MainFrame
- extends JFrame {
- PaneLayout paneLayout1 = new PaneLayout();
- JTabbedPane jTabbedPane1 = new JTabbedPane();
- JPanel jPanel1 = new JPanel();
- JPanel jPanel2 = new JPanel();
- JPanel jPanel3 = new JPanel();
- JPanel jPanel4 = new JPanel();
- JPanel jPanel5 = new JPanel();
- BorderLayout borderLayout1 = new BorderLayout();
- JdbNavToolBar jdbNavToolBar1 = new JdbNavToolBar();
- BorderLayout borderLayout2 = new BorderLayout();
- Database database1 = new Database();
- JPanel jPanel6 = new JPanel();
- BorderLayout borderLayout3 = new BorderLayout();
- JPanel jPanel7 = new JPanel();
- JPanel jPanel8 = new JPanel();
- FlowLayout flowLayout1 = new FlowLayout();
- JLabel jLabel1 = new JLabel();
- JLabel jLabel2 = new JLabel();
- JLabel jLabel3 = new JLabel();
- JLabel jLabel4 = new JLabel();
- JLabel jLabel5 = new JLabel();
- JLabel jLabel6 = new JLabel();
- JLabel jLabel7 = new JLabel();
- JButton jButton1 = new JButton();
- JButton jButton2 = new JButton();
- TableScrollPane tableScrollPane1 = new TableScrollPane();
- JdbTable jdbTable1 = new JdbTable();
- QueryDataSet queryDataSet2 = new QueryDataSet();
- Column column8 = new Column();
- Column column9 = new Column();
- Column column10 = new Column();
- Column column11 = new Column();
- Column column12 = new Column();
- Column column13 = new Column();
- Column column14 = new Column();
- Font font1;
- BorderLayout borderLayout4 = new BorderLayout();
- JPanel jPanel9 = new JPanel();
- JLabel jLabel8 = new JLabel();
- JLabel jLabel9 = new JLabel();
- JLabel jLabel10 = new JLabel();
- JLabel jLabel11 = new JLabel();
- JdbNavToolBar jdbNavToolBar2 = new JdbNavToolBar();
- JPanel jPanel10 = new JPanel();
- JPanel jPanel11 = new JPanel();
- JPanel jPanel12 = new JPanel();
- BorderLayout borderLayout5 = new BorderLayout();
- JLabel jLabel12 = new JLabel();
- TableScrollPane tableScrollPane2 = new TableScrollPane();
- JdbTable jdbTable2 = new JdbTable();
- JLabel jLabel13 = new JLabel();
- TableScrollPane tableScrollPane3 = new TableScrollPane();
- BorderLayout borderLayout6 = new BorderLayout();
- JButton jButton3 = new JButton();
- JButton jButton4 = new JButton();
- XYLayout xYLayout1 = new XYLayout();
- QueryDataSet queryDataSet1 = new QueryDataSet();
- Column column1 = new Column();
- Column column2 = new Column();
- Column column3 = new Column();
- Column column4 = new Column();
- Column column5 = new Column();
- Column column6 = new Column();
- Column column7 = new Column();
- JdbTable jdbTable3 = new JdbTable();
- JLabel jLabel14 = new JLabel();
- JLabel jLabel15 = new JLabel();
- JPanel jPanel13 = new JPanel();
- JLabel jLabel16 = new JLabel();
- JLabel jLabel17 = new JLabel();
- BorderLayout borderLayout7 = new BorderLayout();
- JPanel jPanel14 = new JPanel();
- JPanel jPanel15 = new JPanel();
- TableScrollPane tableScrollPane4 = new TableScrollPane();
- BorderLayout borderLayout8 = new BorderLayout();
- BorderLayout borderLayout9 = new BorderLayout();
- JPanel jPanel16 = new JPanel();
- JPanel jPanel17 = new JPanel();
- JPanel jPanel18 = new JPanel();
- JdbTable jdbTable4 = new JdbTable();
- GridBagLayout gridBagLayout1 = new GridBagLayout();
- JLabel jLabel18 = new JLabel();
- JLabel jLabel19 = new JLabel();
- JdbTextField jdbTextField1 = new JdbTextField();
- JdbTextField jdbTextField2 = new JdbTextField();
- JdbTextArea jdbTextArea1 = new JdbTextArea();
- BorderLayout borderLayout10 = new BorderLayout();
- JButton jButton5 = new JButton();
- JButton jButton6 = new JButton();
- BorderLayout borderLayout11 = new BorderLayout();
- JLabel jLabel20 = new JLabel();
- JdbTextField jdbTextField3 = new JdbTextField();
- JdbTextField jdbTextField4 = new JdbTextField();
- JdbTextField jdbTextField5 = new JdbTextField();
- JdbTextField jdbTextField7 = new JdbTextField();
- JdbTextField jdbTextField8 = new JdbTextField();
- JPanel jPanel19 = new JPanel();
- GridBagLayout gridBagLayout2 = new GridBagLayout();
- ButtonGroup buttonGroup1 = new ButtonGroup();
- JdbRadioButton jdbRadioButton2 = new JdbRadioButton();
- JdbRadioButton jdbRadioButton1 = new JdbRadioButton();
- JdbNavField jdbNavField1 = new JdbNavField();
- JdbTextField jdbTextField9 = new JdbTextField();
- JdbTextField jdbTextField10 = new JdbTextField();
- QueryDataSet queryDataSet4 = new QueryDataSet();
- QueryDataSet qSet_course = new QueryDataSet();
- Column column15 = new Column();
- Column column16 = new Column();
- Column column18 = new Column();
- Column column19 = new Column();
- JdbTextField jdbTextField11 = new JdbTextField();
- JdbNavField jdbNavField2 = new JdbNavField();
- JdbNavField jdbNavField3 = new JdbNavField();
- JdbTextField jdbTextField12 = new JdbTextField();
- JdbTextField jdbTextField13 = new JdbTextField();
- JdbTextField jdbTextField14 = new JdbTextField();
- QueryDataSet qSet_jiangli = new QueryDataSet();
- Column column17 = new Column(); Column column20 = new Column();
- public MainFrame() {
- try {
- jbInit();
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
- public static void main(String[] args) {
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- }
- catch (Exception e) {
- }
- //System.out.println(new javax.swing.UIManager());
- Font f = new java.awt.Font("SansSerif", 0, 12);
- UIManager.put("Label.font",f);
- UIManager.put("Label.foreground",Color.black);
- UIManager.put("Button.font",f);
- UIManager.put("Menu.font",f);
- UIManager.put("MenuItem.font",f);
- UIManager.put("List.font",f);
- UIManager.put("CheckBox.font",f);
- UIManager.put("RadioButton.font",f);
- UIManager.put("ComboBox.font",f);
- UIManager.put("TextArea.font",f);
- UIManager.put("dbTextArea.font",f);
- UIManager.put("font",f);
- MainFrame mainFrame = new MainFrame();
- mainFrame.setFont(new java.awt.Font("SansSerif", 0, 12));
- mainFrame.pack();
- mainFrame.setSize(600,450);
- mainFrame.show();
- }
- private void jbInit() throws Exception {
- font1 = new java.awt.Font("SansSerif", 0, 12);
- this.getContentPane().setLayout(paneLayout1);
- jPanel1.setLayout(borderLayout1);
- jdbNavToolBar1.setDebugGraphicsOptions(0);
- jdbNavToolBar1.setAlignment(FlowLayout.CENTER);
- jPanel5.setLayout(borderLayout2);
- database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:microsoft:sqlserver://localhost:1433;databaseName=student", "sa", "sa", false, "com.microsoft.jdbc.sqlserver.SQLServerDriver"));
- database1.setDatabaseName("");
- jPanel6.setFont(new java.awt.Font("SansSerif", 0, 12));
- jPanel6.setMinimumSize(new Dimension(50, 100));
- jPanel6.setPreferredSize(new Dimension(50, 110));
- jPanel6.setLayout(borderLayout3);
- jPanel7.setFont(new java.awt.Font("SansSerif", 0, 12));
- jPanel7.setMinimumSize(new Dimension(100, 30));
- jPanel7.setPreferredSize(new Dimension(100, 40));
- jPanel7.setLayout(flowLayout1);
- jPanel8.setFont(new java.awt.Font("SansSerif", 0, 12));
- jPanel8.setMinimumSize(new Dimension(10, 10));
- jPanel8.setLayout(gridBagLayout2);
- jLabel1.setText("学号:");
- flowLayout1.setAlignment(FlowLayout.LEFT);
- jLabel2.setHorizontalAlignment(SwingConstants.RIGHT);
- jLabel2.setText("姓名:");
- jLabel3.setHorizontalAlignment(SwingConstants.RIGHT);
- jLabel3.setText("性别:");
- jLabel4.setHorizontalAlignment(SwingConstants.RIGHT);
- jLabel4.setText("班级:");
- jLabel5.setHorizontalAlignment(SwingConstants.RIGHT);
- jLabel5.setText("生日:");
- jLabel6.setHorizontalAlignment(SwingConstants.RIGHT);
- jLabel6.setText("电话:");
- jLabel7.setHorizontalAlignment(SwingConstants.RIGHT);
- jLabel7.setText("地址:");
- jButton1.setText("修改");
- jButton1.addActionListener(new MainFrame_jButton1_actionAdapter(this));
- jButton2.setText("取消");
- jdbTable1.setFont(new java.awt.Font("SansSerif", 0, 12));
- jdbTable1.setDataSet(queryDataSet2);
- jTabbedPane1.setFont(new java.awt.Font("SansSerif", 0, 12));
- jTabbedPane1.setMinimumSize(new Dimension(500, 194));
- jTabbedPane1.setPreferredSize(new Dimension(500, 607));
- queryDataSet2.setProvider(null);
- queryDataSet2.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT student_info.student_id,student_info.student_name,student_info.student_class,student_info.stud" +
- "ent_sex,student_info.student_birthday,student_info.student_tel,student_info.student_address " +
- "FROM student.dbo.student_info", null, true, Load.ALL));
- column8.setCaption("生日");
- column8.setColumnName("student_birthday");
- column8.setDataType(com.borland.dx.dataset.Variant.TIMESTAMP);
- column8.setDisplayMask("yyyy-MM-dd");
- column8.setEditMask("yyyy-MM-dd");
- column8.setSchemaName("dbo");
- column8.setTableName("student_info");
- column8.setWidth(10);
- column8.setServerColumnName("student_birthday");
- column8.setSqlType(93);
- column9.setCaption("学号");
- column9.setColumnName("student_id");
- column9.setDataType(com.borland.dx.dataset.Variant.INT);
- column9.setEditMask("######");
- column9.setFont(new java.awt.Font("SansSerif", 0, 12));
- column9.setRowId(true);
- column9.setSchemaName("dbo");
- column9.setTableName("student_info");
- column9.setWidth(10);
- column9.setServerColumnName("student_id");
- column9.setSqlType(4);
- column10.setCaption("姓名");
- column10.setColumnName("student_name");
- column10.setDataType(com.borland.dx.dataset.Variant.STRING);
- column10.setPrecision(50);
- column10.setSchemaName("dbo");
- column10.setTableName("student_info");
- column10.setWidth(10);
- column10.setServerColumnName("student_name");
- column10.setSqlType(12);
- column11.setCaption("班级");
- column11.setColumnName("student_class");
- column11.setDataType(com.borland.dx.dataset.Variant.INT);
- column11.setSchemaName("dbo");
- column11.setTableName("student_info");
- column11.setWidth(10);
- column11.setServerColumnName("student_class");
- column11.setSqlType(4);
- column12.setCaption("性别");
- column12.setColumnName("student_sex");
- column12.setDataType(com.borland.dx.dataset.Variant.STRING);
- column12.setPrecision(50);
- column12.setSchemaName("dbo");
- column12.setTableName("student_info");
- column12.setWidth(10);
- column12.setServerColumnName("student_sex");
- column12.setSqlType(12);
- column13.setCaption("联系电话");
- column13.setColumnName("student_tel");
- column13.setDataType(com.borland.dx.dataset.Variant.STRING);
- column13.setPrecision(50);
- column13.setSchemaName("dbo");
- column13.setTableName("student_info");
- column13.setWidth(10);
- column13.setServerColumnName("student_tel");
- column13.setSqlType(12);
- column14.setCaption("联系地址");
- column14.setColumnName("student_address");
- column14.setDataType(com.borland.dx.dataset.Variant.STRING);
- column14.setPrecision(150);
- column14.setSchemaName("dbo");
- column14.setTableName("student_info");
- column14.setWidth(14);
- column14.setServerColumnName("student_address");
- column14.setSqlType(12);
- queryDataSet2.setColumns(new Column[] {column9, column10, column11, column12, column8, column13, column14});
- queryDataSet2.addNavigationListener(new MainFrame_queryDataSet2_navigationAdapter(this));
- jPanel1.setFont(new java.awt.Font("SansSerif", 0, 12));
- jPanel1.setPreferredSize(new Dimension(472, 580));
- jPanel5.setFont(new java.awt.Font("SansSerif", 0, 12));
- tableScrollPane1.setFont(new java.awt.Font("SansSerif", 0, 12));
- tableScrollPane1.getViewport().setFont(new java.awt.Font("SansSerif", 0, 12));
- this.setFont(new java.awt.Font("SansSerif", 0, 12));
- jPanel2.setFont(new java.awt.Font("SansSerif", 0, 12));
- jPanel2.setLayout(borderLayout4);
- jLabel8.setText("学号:");
- jLabel9.setRequestFocusEnabled(true);
- jLabel9.setText("姓名: ");
- jLabel10.setText("班级: ");
- jLabel11.setText("性别: ");
- jdbNavToolBar2.setEnabled(false);
- jdbNavToolBar2.setAlignment(FlowLayout.CENTER);
- jPanel10.setMinimumSize(new Dimension(300, 10));
- jPanel10.setPreferredSize(new Dimension(300, 10));
- jPanel10.setLayout(borderLayout5);
- jLabel12.setText("学校设置可选课程信息");
- jPanel11.setMinimumSize(new Dimension(200, 10));
- jPanel11.setPreferredSize(new Dimension(200, 10));
- jPanel11.setLayout(borderLayout6);
- jLabel13.setText("个人已选课程信息");
- jButton3.setText("选课");
- jButton3.addActionListener(new MainFrame_jButton3_actionAdapter(this));
- jButton4.setText("退课");
- jButton4.addActionListener(new MainFrame_jButton4_actionAdapter(this));
- jPanel12.setLayout(xYLayout1);
- queryDataSet1.setReadOnly(false);
- queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT student_coursecode.course_code,student_coursecode.course_name,student_coursecode.course_period" +
- ",student_coursecode.course_credit,student_coursecode.course_teacher,student_coursecode.course_address" +
- " FROM student.dbo.student_coursecode", null, true, Load.ALL));
- column1.setCaption("课程代号");
- column1.setColumnName("course_code");
- column1.setDataType(com.borland.dx.dataset.Variant.INT);
- column1.setRowId(true);
- column1.setSchemaName("dbo");
- column1.setTableName("student_coursecode");
- column1.setWidth(10);
- column1.setServerColumnName("course_code");
- column1.setSqlType(4);
- column2.setCaption("课程名称");
- column2.setColumnName("course_name");
- column2.setDataType(com.borland.dx.dataset.Variant.STRING);
- column2.setPrecision(50);
- column2.setSchemaName("dbo");
- column2.setTableName("student_coursecode");
- column2.setWidth(10);
- column2.setServerColumnName("course_name");
- column2.setSqlType(12);
- column3.setCaption("课程学时");
- column3.setColumnName("course_period");
- column3.setDataType(com.borland.dx.dataset.Variant.INT);
- column3.setSchemaName("dbo");
- column3.setTableName("student_coursecode");
- column3.setWidth(10);
- column3.setServerColumnName("course_period");
- column3.setSqlType(4);
- column4.setCaption("课程学分");
- column4.setColumnName("course_credit");
- column4.setDataType(com.borland.dx.dataset.Variant.DOUBLE);
- column4.setSchemaName("dbo");
- column4.setTableName("student_coursecode");
- column4.setWidth(10);
- column4.setServerColumnName("course_credit");
- column4.setSqlType(6);
- column5.setCaption("任课老师");
- column5.setColumnName("course_teacher");
- column5.setDataType(com.borland.dx.dataset.Variant.STRING);
- column5.setPrecision(50);
- column5.setSchemaName("dbo");
- column5.setTableName("student_coursecode");
- column5.setWidth(10);
- column5.setServerColumnName("course_teacher");
- column5.setSqlType(12);
- column6.setCaption("上课地点");
- column6.setColumnName("course_address");
- column6.setDataType(com.borland.dx.dataset.Variant.STRING);
- column6.setPrecision(50);
- column6.setSchemaName("dbo");
- column6.setTableName("student_coursecode");
- column6.setWidth(10);
- column6.setServerColumnName("course_address");
- column6.setSqlType(12);
- queryDataSet1.setColumns(new Column[] {column1, column2, column3, column4, column5, column6});
- jdbTable2.setDataSet(queryDataSet1);
- jdbTable2.setEditable(false);
- column7.setCaption("学生姓名");
- column7.setColumnName("course_name");
- column7.setDataType(com.borland.dx.dataset.Variant.STRING);
- column7.setPrecision(50);
- column7.setSchemaName("dbo");
- column7.setTableName("student_course");
- column7.setWidth(10);
- column7.setServerColumnName("course_name");
- column7.setSqlType(12);
- jLabel14.setText("学号:");
- jLabel15.setText("性别: ");
- jLabel16.setRequestFocusEnabled(true);
- jLabel16.setText("姓名: ");
- jLabel17.setText("班级: ");
- jPanel3.setLayout(borderLayout7);
- jPanel15.setMinimumSize(new Dimension(200, 100));
- jPanel15.setPreferredSize(new Dimension(200, 250));
- jPanel15.setLayout(borderLayout8);
- jPanel14.setLayout(borderLayout9);
- jPanel14.setMinimumSize(new Dimension(300, 50));
- jPanel14.setPreferredSize(new Dimension(300, 50));
- jPanel14.setVerifyInputWhenFocusTarget(true);
- jPanel13.setPreferredSize(new Dimension(404, 40));
- jPanel16.setPreferredSize(new Dimension(280, 10));
- jPanel16.setLayout(gridBagLayout1);
- jLabel18.setText("获奖时间:");
- jLabel19.setText("获奖名称:");
- jdbTextField1.setText("jdbTextField1");
- jdbTextField2.setText("jdbTextField2");
- jdbTextArea1.setText("jdbTextArea1");
- jPanel17.setLayout(borderLayout10);
- jButton5.setText("增加");
- jButton6.setText("取消");
- jPanel18.setLayout(borderLayout11);
- borderLayout11.setVgap(10);
- jLabel20.setText("获奖内容具体描述:");
- jdbTextField3.setEnabled(true);
- jdbTextField3.setAlignmentX((float) 0.5);
- jdbTextField3.setDoubleBuffered(false);
- jdbTextField3.setMinimumSize(new Dimension(10, 22));
- jdbTextField3.setPreferredSize(new Dimension(15, 22));
- jdbTextField3.setMargin(new Insets(1, 3, 1, 3));
- jdbTextField3.setText("");
- jdbTextField3.setHorizontalAlignment(SwingConstants.LEFT);
- jdbTextField3.setColumnName("student_name");
- jdbTextField3.setDataSet(queryDataSet2);
- jdbTextField3.setEnablePopupMenu(true);
- jdbTextField3.setPostOnFocusLost(true);
- jdbTextField4.setDebugGraphicsOptions(0);
- jdbTextField4.setText("jdbTextField4");
- jdbTextField4.setColumnName("student_class");
- jdbTextField4.setDataSet(queryDataSet2);
- jdbTextField5.setText("jdbTextField5");
- jdbTextField5.setColumnName("student_tel");
- jdbTextField5.setDataSet(queryDataSet2);
- jdbTextField7.setDisabledTextColor(Color.gray);
- jdbTextField7.setText("jdbTextField7");
- jdbTextField7.setColumnName("student_birthday");
- jdbTextField7.setDataSet(queryDataSet2);
- jdbTextField8.setText("jdbTextField8");
- jdbTextField8.setColumnName("student_address");
- jdbTextField8.setDataSet(queryDataSet2);
- jdbRadioButton2.setSelected(false);
- jdbRadioButton2.setText("女");
- jdbRadioButton2.setButtonGroup(buttonGroup1);
- jdbRadioButton2.setColumnName("student_sex");
- jdbRadioButton2.setDataSet(queryDataSet2);
- jdbRadioButton2.setSelectedDataValue("女");
- jdbRadioButton1.setActionCommand("男");
- jdbRadioButton1.setContentAreaFilled(true);
- jdbRadioButton1.setSelected(true);
- jdbRadioButton1.setText("男");
- jdbRadioButton1.setButtonGroup(buttonGroup1);
- jdbRadioButton1.setColumnName("student_sex");
- jdbRadioButton1.setDataSet(queryDataSet2);
- jdbRadioButton1.setSelectedDataValue("男");
- jdbNavField1.setMinimumSize(new Dimension(100, 22));
- jdbNavField1.setPreferredSize(new Dimension(100, 22));
- jdbNavField1.setText("jdbNavField1");
- jdbNavField1.setColumnName("student_id");
- jdbNavField1.setDataSet(queryDataSet2);
- jdbTextField9.setEnabled(true);
- jdbTextField9.setPreferredSize(new Dimension(70, 22));
- jdbTextField9.setEditable(false);
- jdbTextField9.setText("jdbTextField9");
- jdbTextField9.setColumns(0);
- jdbTextField9.setColumnName("student_class");
- jdbTextField9.setDataSet(queryDataSet2);
- jdbTextField10.setEnabled(true);
- jdbTextField10.setPreferredSize(new Dimension(50, 22));
- jdbTextField10.setEditable(false);
- jdbTextField10.setText("jdbTextField10");
- jdbTextField10.setColumnName("student_sex");
- jdbTextField10.setDataSet(queryDataSet2);
- queryDataSet4.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT student_count.count_id FROM student.dbo.student_count", null, true, Load.ALL));
- qSet_course.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT student_course.count_id,student_course.course_id,student_course.course_name,student_course.cou" +
- "rse_no FROM student.dbo.student_course", null, true, Load.ALL));
- column15.setColumnName("count_id");
- column15.setDataType(com.borland.dx.dataset.Variant.INT);
- column15.setRowId(true);
- column15.setSchemaName("dbo");
- column15.setTableName("student_course");
- column15.setVisible(com.borland.jb.util.TriStateProperty.FALSE);
- column15.setServerColumnName("count_id");
- column15.setSqlType(4);
- column16.setColumnName("course_id");
- column16.setDataType(com.borland.dx.dataset.Variant.INT);
- column16.setSchemaName("dbo");
- column16.setTableName("student_course");
- column16.setVisible(com.borland.jb.util.TriStateProperty.FALSE);
- column16.setServerColumnName("course_id");
- column16.setSqlType(4);
- column18.setCaption("学生姓名");
- column18.setColumnName("course_name");
- column18.setDataType(com.borland.dx.dataset.Variant.STRING);
- column18.setPrecision(50);
- column18.setSchemaName("dbo");
- column18.setTableName("student_course");
- column18.setWidth(10);
- column18.setServerColumnName("course_name");
- column18.setSqlType(12);
- column19.setCaption("所选课程编号");
- column19.setColumnName("course_no");
- column19.setDataType(com.borland.dx.dataset.Variant.INT);
- column19.setSchemaName("dbo");
- column19.setTableName("student_course");
- column19.setServerColumnName("course_no");
- column19.setSqlType(4);
- qSet_course.setColumns(new Column[] {column15, column16, column18, column19});
- qSet_course.addRowFilterListener(new MainFrame_qSet_course_rowFilterAdapter(this));
- jdbTable3.setDataSet(qSet_course);
- jdbTextField11.setMinimumSize(new Dimension(70, 22));
- jdbTextField11.setPreferredSize(new Dimension(70, 22));
- jdbTextField11.setEditable(false);
- jdbTextField11.setText("jdbTextField11");
- jdbTextField11.setColumnName("student_name");
- jdbTextField11.setDataSet(queryDataSet2);
- jdbNavField2.setDataSet(queryDataSet2);
- jdbNavField2.setColumnName("student_id");
- jdbNavField2.setPreferredSize(new Dimension(70, 22));
- jdbNavField2.setMinimumSize(new Dimension(70, 22));
- jdbNavField3.setMinimumSize(new Dimension(70, 22));
- jdbNavField3.setPreferredSize(new Dimension(70, 22));
- jdbNavField3.setColumnName("student_id");
- jdbNavField3.setDataSet(queryDataSet2);
- jdbTextField12.setDataSet(queryDataSet2);
- jdbTextField12.setColumnName("student_name");
- jdbTextField12.setText("jdbTextField11");
- jdbTextField12.setEditable(false);
- jdbTextField12.setPreferredSize(new Dimension(70, 22));
- jdbTextField12.setMinimumSize(new Dimension(70, 22));
- jdbTextField13.setDataSet(queryDataSet2);
- jdbTextField13.setColumnName("student_class");
- jdbTextField13.setColumns(0);
- jdbTextField13.setText("jdbTextField9");
- jdbTextField13.setEditable(false);
- jdbTextField13.setPreferredSize(new Dimension(70, 22));
- jdbTextField13.setEnabled(true);
- jdbTextField14.setDataSet(queryDataSet2);
- jdbTextField14.setColumnName("student_sex");
- jdbTextField14.setText("jdbTextField10");
- jdbTextField14.setEditable(false);
- jdbTextField14.setPreferredSize(new Dimension(50, 22));
- jdbTextField14.setEnabled(true);
- qSet_jiangli.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT student_gcheck.gcheck_id,student_gcheck.gcheck_no,student_gcheck.gcheck_name,student_gcheck.gc" +
- "heck_time,student_gcheck.gcheck_title,student_gcheck.gcheck_disc " +
- "FROM student.dbo.student_gcheck", null, true, Load.ALL));
- column17.setColumnName("gcheck_time");
- column17.setDataType(com.borland.dx.dataset.Variant.TIMESTAMP);
- column17.setEditMask("yyyy-MM-dd");
- column17.setSchemaName("dbo");
- column17.setTableName("student_gcheck");
- column17.setServerColumnName("gcheck_time");
- column17.setSqlType(93);
- column20.setColumnName("gcheck_time"); column20.setDataType(com.borland.dx.dataset.Variant.TIMESTAMP); column20.setEditMask("yyyy-MM-dd"); column20.setSchemaName("dbo"); column20.setTableName("student_gcheck"); column20.setServerColumnName("gcheck_time"); column20.setSqlType(93); qSet_jiangli.setColumns(new Column[] {column20}); this.getContentPane().add(jTabbedPane1,
- new PaneConstraints("jTabbedPane1", "jTabbedPane1",
- PaneConstraints.ROOT, 1.0f));
- jTabbedPane1.add(jPanel1, "个人信息管理");
- jPanel1.add(jPanel5, BorderLayout.CENTER);
- jPanel5.add(jdbNavToolBar1, BorderLayout.SOUTH);
- jPanel5.add(jPanel6, BorderLayout.NORTH);
- jPanel6.add(jPanel7, BorderLayout.NORTH);
- jPanel7.add(jLabel1, null);
- jPanel6.add(jPanel8, BorderLayout.CENTER);
- jPanel8.add(jLabel2, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 28, 19));
- jPanel8.add(jdbTextField3, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 75, 13));
- jPanel8.add(jLabel4, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 31, 19));
- jPanel8.add(jdbTextField4, new GridBagConstraints(4, 0, 1, 1, 1.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 57, 13));
- jPanel8.add(jLabel6, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 40, 19));
- jPanel8.add(jdbTextField5, new GridBagConstraints(6, 0, 1, 1, 1.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 57, 13));
- jPanel8.add(jButton1, new GridBagConstraints(7, 0, 1, 1, 0.0, 0.0
- ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 3), 16, 10));
- jPanel8.add(jLabel3, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 30, 19));
- jPanel8.add(jPanel19, new GridBagConstraints(2, 1, 1, 1, 1.0, 1.0
- ,GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), -3, 25));
- jPanel8.add(jLabel5, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0
- ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 1), 30, 19));
- jPanel8.add(jdbTextField7, new GridBagConstraints(4, 1, 1, 1, 1.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 7, 13));
- jPanel8.add(jLabel7, new GridBagConstraints(5, 1, 1, 1, 0.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 40, 19));
- jPanel8.add(jdbTextField8, new GridBagConstraints(6, 1, 1, 1, 1.0, 0.0
- ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 57, 13));
- jPanel8.add(jButton2, new GridBagConstraints(7, 1, 1, 1, 0.0, 0.0
- ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 3), 16, 10));
- jPanel5.add(tableScrollPane1, BorderLayout.CENTER);
- tableScrollPane1.getViewport().add(jdbTable1, null);
- jTabbedPane1.add(jPanel2, "选课信息管理");
- jTabbedPane1.add(jPanel3, "奖励信息管理");
- jPanel3.add(jPanel13, BorderLayout.NORTH);
- jPanel13.add(jLabel14, null);
- jPanel13.add(jLabel16, null);
- jPanel13.add(jLabel17, null);
- jPanel13.add(jLabel15, null);
- jPanel3.add(jPanel15, BorderLayout.SOUTH);
- jPanel15.add(tableScrollPane4, BorderLayout.CENTER);
- tableScrollPane4.getViewport().add(jdbTable4, null);
- jPanel3.add(jPanel14, BorderLayout.CENTER);
- jPanel14.add(jPanel16, BorderLayout.WEST);
- jPanel16.add(jLabel18, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
- ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 17, 14));
- jPanel16.add(jLabel19, new GridBagConstraints(0, 1, 1, 2, 0.0, 0.0
- ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 13, 10));
- jPanel16.add(jdbTextField1, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
- ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 28, 2));
- jPanel16.add(jdbTextField2, new GridBagConstraints(1, 2, 2, 2, 0.0, 0.0
- ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 27, 0));
- jPanel14.add(jPanel17, BorderLayout.CENTER);
- jPanel17.add(jdbTextArea1, BorderLayout.CENTER);
- jPanel17.add(jLabel20, BorderLayout.NORTH);
- jPanel14.add(jPanel18, BorderLayout.EAST);
- jPanel18.add(jButton5, BorderLayout.NORTH);
- jPanel18.add(jButton6, BorderLayout.CENTER);
- jTabbedPane1.add(jPanel4, "职务信息管理");
- jPanel2.add(jPanel9, BorderLayout.NORTH);
- jPanel9.add(jLabel8, null);
- jPanel9.add(jdbNavField2, null);
- jPanel9.add(jLabel9, null);
- jPanel9.add(jdbTextField11, null);
- jPanel9.add(jLabel10, null);
- jPanel9.add(jdbTextField9, null);
- jPanel9.add(jLabel11, null);
- jPanel9.add(jdbTextField10, null);
- jPanel2.add(jdbNavToolBar2, BorderLayout.SOUTH);
- jPanel2.add(jPanel10, BorderLayout.WEST);
- jPanel10.add(jLabel12, BorderLayout.NORTH);
- jPanel10.add(tableScrollPane2, BorderLayout.CENTER);
- tableScrollPane2.getViewport().add(jdbTable2, null);
- jPanel2.add(jPanel11, BorderLayout.EAST);
- jPanel11.add(jLabel13, BorderLayout.NORTH);
- jPanel11.add(tableScrollPane3, BorderLayout.CENTER);
- tableScrollPane3.getViewport().add(jdbTable3, null);
- jPanel2.add(jPanel12, BorderLayout.CENTER);
- jPanel12.add(jButton3, new XYConstraints(4, 89, -1, 31));
- jPanel12.add(jButton4, new XYConstraints(2, 153, 59, 33));
- jPanel19.add(jdbRadioButton1, null);
- jPanel19.add(jdbRadioButton2, null);
- buttonGroup1.add(jdbRadioButton2);
- buttonGroup1.add(jdbRadioButton1);
- jPanel7.add(jdbNavField1, null);
- jPanel13.add(jdbNavField3, null);
- jPanel13.add(jdbTextField12, null);
- jPanel13.add(jdbTextField13, null);
- jPanel13.add(jdbTextField14, null);
- }
- void jButton1_actionPerformed(ActionEvent e) {
- queryDataSet2.saveChanges();
- }
- void jButton3_actionPerformed(ActionEvent e) {
- if ( queryDataSet2.isEmpty() ) return;
- if ( queryDataSet1.isEmpty() ) return;
- if (!queryDataSet4.isOpen()) queryDataSet4.open();
- queryDataSet4.last();
- int i = queryDataSet4.getInt("count_id");
- queryDataSet4.setInt("count_id", ++i);
- queryDataSet4.post();
- queryDataSet4.saveChanges( queryDataSet4 );
- if (! qSet_course.isOpen() ) qSet_course.open();
- try {
- qSet_course.insertRow(false);
- qSet_course.setInt("count_id", i);
- qSet_course.setInt("course_id", queryDataSet2.getInt("student_id"));
- qSet_course.setString("course_name",
- queryDataSet2.getString("student_name"));
- qSet_course.setInt("course_no", queryDataSet1.getInt("course_code"));
- qSet_course.post();
- qSet_course.saveChanges(qSet_course);
- }catch (Exception ex ){
- qSet_course.refresh();
- }
- }
- void jButton4_actionPerformed(ActionEvent e) {
- if (! qSet_course.isOpen() ) qSet_course.open();
- if ( qSet_course.isEmpty() ) return;
- qSet_course.deleteRow();
- qSet_course.saveChanges( qSet_course );
- }
- void qSet_course_filterRow(ReadRow row, RowFilterResponse response) {
- if ( row.getInt("course_id" )== queryDataSet2.getInt("student_id") )
- {
- response.add();
- }else{
- response.ignore();
- }
- }
- void queryDataSet2_masterNavigating(MasterNavigateEvent e) {
- }
- void jPanel2_focusGained(FocusEvent e) {
- qSet_course.refilter();
- }
- void queryDataSet2_navigated(NavigationEvent e) {
- qSet_course.refilter();
- }
- }
- class MainFrame_jButton1_actionAdapter implements java.awt.event.ActionListener {
- MainFrame adaptee;
- MainFrame_jButton1_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
- public void actionPerformed(ActionEvent e) {
- adaptee.jButton1_actionPerformed(e);
- }
- }
- class MainFrame_jButton3_actionAdapter implements java.awt.event.ActionListener {
- MainFrame adaptee;
- MainFrame_jButton3_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
- public void actionPerformed(ActionEvent e) {
- adaptee.jButton3_actionPerformed(e);
- }
- }
- class MainFrame_jButton4_actionAdapter implements java.awt.event.ActionListener {
- MainFrame adaptee;
- MainFrame_jButton4_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
- public void actionPerformed(ActionEvent e) {
- adaptee.jButton4_actionPerformed(e);
- }
- }
- class MainFrame_qSet_course_rowFilterAdapter implements com.borland.dx.dataset.RowFilterListener {
- MainFrame adaptee;
- MainFrame_qSet_course_rowFilterAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
- public void filterRow(ReadRow row, RowFilterResponse response) {
- adaptee.qSet_course_filterRow(row, response);
- }
- }
- class MainFrame_queryDataSet2_navigationAdapter implements com.borland.dx.dataset.NavigationListener {
- MainFrame adaptee;
- MainFrame_queryDataSet2_navigationAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
- public void navigated(NavigationEvent e) {
- adaptee.queryDataSet2_navigated(e);
- }
- }