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

📄 usermaintainframe.java~1~

📁 基于数据库组件的系统开发的实例
💻 JAVA~1~
字号:
package parkingsystem;import javax.swing.*;import java.awt.*;import com.borland.dbswing.*;import com.borland.jbcl.layout.*;import com.borland.dx.sql.dataset.*;public class UserMaintainFrame extends JFrame {  BorderLayout borderLayout1 = new BorderLayout();  JPanel jPanel1 = new JPanel();  JPanel jPanel2 = new JPanel();  BorderLayout borderLayout2 = new BorderLayout();  JPanel jPanel3 = new JPanel();  JPanel jPanel4 = new JPanel();  BorderLayout borderLayout3 = new BorderLayout();  TableScrollPane tableScrollPane1 = new TableScrollPane();  JdbTable jdbTable1 = new JdbTable();  JdbNavToolBar jdbNavToolBar1 = new JdbNavToolBar();  JdbStatusLabel jdbStatusLabel1 = new JdbStatusLabel();  XYLayout xYLayout1 = new XYLayout();  JdbLabel jdbLabel1 = new JdbLabel();  JdbNavField jdbNavField1 = new JdbNavField();  XYLayout xYLayout2 = new XYLayout();  JButton jButton1 = new JButton();  Database database1 = new Database();  QueryDataSet queryDataSet1 = new QueryDataSet();  JButton jButton2 = new JButton();  public UserMaintainFrame() {    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  private void jbInit() throws Exception {    this.getContentPane().setLayout(borderLayout1);    jPanel1.setPreferredSize(new Dimension(10, 10));    jPanel1.setLayout(borderLayout2);    jPanel3.setPreferredSize(new Dimension(500, 40));    jPanel3.setLayout(xYLayout1);    jPanel4.setLayout(borderLayout3);    jPanel2.setPreferredSize(new Dimension(500, 80));    jPanel2.setLayout(xYLayout2);    jdbStatusLabel1.setText("jdbStatusLabel1");    jdbLabel1.setFont(new java.awt.Font("Dialog", 0, 12));    jdbLabel1.setText("Find:");    jdbLabel1.setDataSet(queryDataSet1);    jdbNavField1.setText("jdbNavField1");    jButton1.setFont(new java.awt.Font("Serif", 0, 14));    jButton1.setText("新增用户");    database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:microsoft:sqlserver://localhost:1433;DataBaseName=carparkingdb", "sa", "", false, "com.microsoft.jdbc.sqlserver.SQLServerDriver"));    jButton2.setText("修改信息");    jButton2.setFont(new java.awt.Font("Serif", 0, 14));    queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "select * from users", null, true, Load.ALL));    jdbTable1.setDataSet(queryDataSet1);    jdbTable1.setEditable(false);    this.getContentPane().add(jPanel1,  BorderLayout.CENTER);    jPanel1.add(jPanel3, BorderLayout.NORTH);    jPanel3.add(jdbNavToolBar1,     new XYConstraints(7, 0, 281, -1));    jPanel3.add(jdbNavField1,    new XYConstraints(356, 10, 93, 25));    jPanel3.add(jdbLabel1, new XYConstraints(308, 11, 44, 23));    jPanel1.add(jPanel4,  BorderLayout.CENTER);    jPanel4.add(tableScrollPane1,  BorderLayout.CENTER);    jPanel1.add(jdbStatusLabel1,  BorderLayout.SOUTH);    tableScrollPane1.getViewport().add(jdbTable1, null);    this.getContentPane().add(jPanel2, BorderLayout.SOUTH);    jPanel2.add(jButton1,          new XYConstraints(102, 11, 93, 34));    jPanel2.add(jButton2,        new XYConstraints(266, 11, 93, 34));  }}

⌨️ 快捷键说明

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