⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usersman_frm.java~9~

📁 这里有好几个关于SQL Server 2000 开发的项目代码
💻 JAVA~9~
字号:
package KcglSys;import java.awt.*;import java.awt.event.*;import javax.swing.*;import com.borland.jbcl.layout.*;import com.borland.dx.dataset.*;import com.borland.dx.sql.dataset.*;import com.borland.dbswing.*;/** * <p>Title: 库存管理信息系统</p> * <p>Description: 库存管理信息系统,企业好帮手</p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: ios</p> * @author dragon * @version 1.0 */public class UsersMan_Frm extends JInternalFrame {  JPanel contentPane;  XYLayout xYLayout1 = new XYLayout();  JPanel jPanel1 = new JPanel();  QueryDataSet queryDataSet1 = new QueryDataSet();  Database database1 = new Database();  TableScrollPane tableScrollPane1 = new TableScrollPane();  XYLayout xYLayout2 = new XYLayout();  JdbTable jdbTable1 = new JdbTable();  JdbStatusLabel jdbStatusLabel1 = new JdbStatusLabel();  JdbNavToolBar jdbNavToolBar1 = new JdbNavToolBar();  JButton jButton1 = new JButton();  Column column1 = new Column();  //Construct the frame  public UsersMan_Frm() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    contentPane = (JPanel) this.getContentPane();    contentPane.setLayout(xYLayout1);    this.setClosable(true);    this.setIcon(false);    this.setIconifiable(true);    this.setResizable(true);    this.setSize(new Dimension(435, 392));    this.setTitle("用户管理");    jPanel1.setBorder(BorderFactory.createEtchedBorder());    jPanel1.setLayout(xYLayout2);    database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:odbc:KcglSys", "sa", "sa", false, "sun.jdbc.odbc.JdbcOdbcDriver"));    queryDataSet1.setMetaDataUpdate(MetaDataUpdate.TABLENAME+MetaDataUpdate.PRECISION+MetaDataUpdate.SCALE+MetaDataUpdate.SEARCHABLE);    queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT UsersInfo.userid as \"员工编号\",UsersInfo.username as \"员工姓名\",UsersInfo.password " +      "as \"口令\" FROM KcglSys.dbo.UsersInfo", null, true, Load.ALL));    jdbTable1.setDataSet(queryDataSet1);    jdbStatusLabel1.setText("jdbStatusLabel1");    jdbStatusLabel1.setDataSet(queryDataSet1);    jdbNavToolBar1.setBorder(BorderFactory.createEtchedBorder());    jButton1.setText("返回");    jButton1.addActionListener(new UsersMan_Frm_jButton1_actionAdapter(this));    column1.setColumnName("员工编号");    column1.setDataType(com.borland.dx.dataset.Variant.INT);    column1.setRowId(true);    column1.setSchemaName("dbo");    column1.setTableName("UsersInfo");    column1.setServerColumnName("userid");    column1.setSqlType(4);    queryDataSet1.setColumns(new Column[] {column1});    contentPane.add(jPanel1,    new XYConstraints(16, 16, 370, 265));    jPanel1.add(tableScrollPane1,   new XYConstraints(3, 1, 361, 223));    jPanel1.add(jdbStatusLabel1, new XYConstraints(3, 225, 361, 34));    contentPane.add(jdbNavToolBar1, new XYConstraints(16, 282, 370, -1));    contentPane.add(jButton1,   new XYConstraints(151, 329, -1, 19));    tableScrollPane1.getViewport().add(jdbTable1, null);  }  //Overridden so we can exit when window is closed  protected void processWindowEvent(WindowEvent e) {     processWindowEvent(e);    if (e.getID() == WindowEvent.WINDOW_CLOSING) {      System.exit(0);    }  }  void jButton1_actionPerformed(ActionEvent e) {     this.dispose();  }}class UsersMan_Frm_jButton1_actionAdapter implements java.awt.event.ActionListener {  UsersMan_Frm adaptee;  UsersMan_Frm_jButton1_actionAdapter(UsersMan_Frm adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButton1_actionPerformed(e);  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -