?? dialog_student_search.java~7~
字號:
package student_computer;import java.awt.*;import javax.swing.*;import com.borland.dx.sql.dataset.*;import com.borland.dbswing.*;import com.borland.dx.dataset.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class Dialog_student_search extends JDialog { JPanel panel1 = new JPanel(); BorderLayout borderLayout1 = new BorderLayout(); FlowLayout flowLayout1 = new FlowLayout(); JLabel jLabel1 = new JLabel(); JTextField jTextField1 = new JTextField(); JButton jButton1 = new JButton(); JPanel jPanel1 = new JPanel(); BorderLayout borderLayout2 = new BorderLayout(); Database database1 = new Database(); QueryDataSet queryDataSet1 = new QueryDataSet(); JdbNavToolBar jdbNavToolBar1 = new JdbNavToolBar(); TableScrollPane tableScrollPane1 = new TableScrollPane(); JdbTable jdbTable1 = new JdbTable(); JdbStatusLabel jdbStatusLabel1 = new JdbStatusLabel(); QueryDataSet queryDataSet2 = new QueryDataSet(); ParameterRow parameterRow1 = new ParameterRow(); Column column1 = new Column(); public Dialog_student_search(Frame frame, String title, boolean modal) { super(frame, title, modal); try { jbInit(); pack(); } catch(Exception ex) { ex.printStackTrace(); } } public Dialog_student_search() { this(null, "", false); } private void jbInit() throws Exception { panel1.setLayout(flowLayout1); this.getContentPane().setLayout(borderLayout1); jLabel1.setText("jLabel1"); jTextField1.setText("jTextField1"); jButton1.setText("jButton1"); jPanel1.setLayout(borderLayout2); database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:microsoft:sqlserver://210.30.104.11:1433;DatabaseName=student_computer", "xueli", "gejingguo", false, "com.microsoft.jdbc.sqlserver.SQLServerDriver")); queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "select * from student;", null, true, Load.ALL)); jdbStatusLabel1.setText("jdbStatusLabel1"); jdbTable1.setDataSet(queryDataSet1); column1.setColumnName("student_num"); column1.setDataType(com.borland.dx.dataset.Variant.STRING); column1.setPreferredOrdinal(0); column1.setServerColumnName("NewColumn1"); column1.setSqlType(0); parameterRow1.setColumns(new Column[] {column1}); queryDataSet2.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "select * from student where student_number=:student_num;", parameterRow1, true, Load.ALL)); getContentPane().add(panel1, BorderLayout.NORTH); panel1.add(jLabel1, null); panel1.add(jTextField1, null); panel1.add(jButton1, null); this.getContentPane().add(jPanel1, BorderLayout.CENTER); jPanel1.add(jdbNavToolBar1, BorderLayout.NORTH); jPanel1.add(tableScrollPane1, BorderLayout.CENTER); jPanel1.add(jdbStatusLabel1, BorderLayout.SOUTH); tableScrollPane1.getViewport().add(jdbTable1, null); this.setTitle("學生信息查詢"); this.setSize(new Dimension(350, 347)); this.setLocation(210,200); this.setVisible(true); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -