📄 wuyebody.java
字号:
package 小区物业管理系统;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.sql.*;
import javax.swing.*;
import javax.swing.JPanel;
import com.borland.dbswing.JdbStatusLabel;
import com.borland.dbswing.TableScrollPane;
import java.awt.Rectangle;
import com.borland.dbswing.JdbTable;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import com.borland.dbswing.JdbNavToolBar;
import javax.swing.JButton;
import java.awt.GridBagLayout;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.borland.dx.sql.dataset.Database;
import com.borland.dx.sql.dataset.ConnectionDescriptor;
import com.borland.dx.sql.dataset.QueryDataSet;
import com.borland.dbswing.DBDisposeMonitor;
import com.borland.dx.sql.dataset.Load;
import com.borland.dx.sql.dataset.QueryDescriptor;
import javax.swing.JLabel;
import javax.swing.JComboBox;
import javax.swing.JTextField;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2008</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class wuyebody extends JFrame {
JPanel contentPane;
boolean shui=false;
boolean dian=false;
boolean wu=false;
Database database1 = new Database();
QueryDataSet queryDataSet1 = new QueryDataSet();
DBDisposeMonitor dBDisposeMonitor1 = new DBDisposeMonitor();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JComboBox fanghao = new JComboBox();
JLabel jLabel3 = new JLabel();
JComboBox nian = new JComboBox();
JLabel jLabel4 = new JLabel();
JComboBox yue = new JComboBox();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JTextField yezhu = new JTextField();
JLabel jLabel7 = new JLabel();
JLabel jLabel8 = new JLabel();
JLabel jLabel9 = new JLabel();
JTextField qianshui = new JTextField();
JTextField qiandian = new JTextField();
JTextField qianwuye = new JTextField();
JButton jiaoshui = new JButton();
JButton jiaodian = new JButton();
JButton jiaowuye = new JButton();
JLabel jLabel10 = new JLabel();
JLabel jLabel11 = new JLabel();
JLabel jLabel12 = new JLabel();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
GridBagLayout gridBagLayout1 = new GridBagLayout();
public wuyebody() {
try {
// setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
/**
* Component initialization.
*
* @throws java.lang.Exception
*/
private void jbInit() throws Exception {
contentPane = (JPanel) getContentPane();
contentPane.setLayout(gridBagLayout1);
setSize(new Dimension(503, 583));
setTitle("物业收费管理");
database1.setConnection(new ConnectionDescriptor(
"jdbc:borland:dslocal:C:\\物业管理\\小区物业管理系统\\数据库\\database.jds",
"admin", "admin", false,
"com.borland.datastore.jdbc.DataStoreDriver"));
dBDisposeMonitor1.setDataAwareComponentContainer(this);
queryDataSet1.setQuery(new QueryDescriptor(database1,
"select * from WUYE", null, true, Load.ALL));
jLabel1.setText("请选择房号和时间");
jLabel2.setText("房号");
fanghao.setEditable(true);
jLabel3.setText("时间");
jLabel4.setText("年");
yue.addActionListener(new wuyebody_yue_actionAdapter(this));
jLabel5.setText("月");
jLabel6.setText("业主姓名");
yezhu.setEditable(false);
jLabel7.setText("欠水费");
jLabel8.setText("欠电费");
jLabel9.setText("欠物业费 ");
jiaoshui.setText("交水费");
jiaoshui.addActionListener(new wuyebody_jiaoshui_actionAdapter(this));
jiaodian.setText("交电费");
jiaodian.addActionListener(new wuyebody_jiaodian_actionAdapter(this));
jiaowuye.setText("交物业费");
jiaowuye.addActionListener(new wuyebody_jiaowuye_actionAdapter(this));
jLabel10.setText("元");
jLabel11.setText("元");
jLabel12.setText("元");
jButton1.setText("退出");
jButton1.addActionListener(new wuyebody_jButton1_actionAdapter(this));
jButton2.setText("保存");
jButton2.addActionListener(new wuyebody_jButton2_actionAdapter(this));
contentPane.add(jLabel1, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(24, 34, 0, 18), 49, 14));
contentPane.add(jLabel2, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(24, 34, 0, 29), 30, 1));
contentPane.add(yue, new GridBagConstraints(3, 2, 2, 2, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
new Insets(41, 0, 57, 0), 34, 0));
contentPane.add(jLabel5, new GridBagConstraints(5, 2, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(45, 9, 0, 134), 30, 0));
contentPane.add(jLabel4, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(45, 7, 0, 0), 30, 0));
contentPane.add(nian, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
new Insets(40, 0, 0, 0), 33, 0));
contentPane.add(jLabel3, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(44, 34, 0, 41), 18, 0));
contentPane.add(jLabel6, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(47, 34, 0, 18), 17, 0));
contentPane.add(yezhu, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(43, 0, 0, 0), 68, 0));
contentPane.add(fanghao, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
new Insets(17, 0, 0, 0), 49, 0));
contentPane.add(jLabel8, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(0, 34, 0, 41), 6, 0));
contentPane.add(jLabel7, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(46, 34, 0, 41), 6, 0));
contentPane.add(jLabel9, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(51, 34, 0, 0), 29, 0));
contentPane.add(qianshui, new GridBagConstraints(1, 4, 1, 1, 1.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(42, 0, 0, 6), 60, 0));
contentPane.add(qiandian, new GridBagConstraints(1, 5, 1, 2, 1.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(35, 0, 0, 0), 60, 0));
contentPane.add(qianwuye, new GridBagConstraints(1, 7, 1, 1, 1.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
new Insets(47, 0, 0, 6), 60, 0));
contentPane.add(jLabel10, new GridBagConstraints(2, 4, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(43, 11, 0, 0), 36, 0));
contentPane.add(jLabel12, new GridBagConstraints(2, 7, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(50, 11, 0, 0), 36, 0));
contentPane.add(jLabel11, new GridBagConstraints(2, 5, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE,
new Insets(32, 11, 0, 0), 36, 0));
contentPane.add(jButton1, new GridBagConstraints(4, 8, 2, 1, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE,
new Insets(93, 51, 69, 114), 24, 0));
contentPane.add(jButton2, new GridBagConstraints(0, 8, 2, 1, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE,
new Insets(93, 56, 69, 61), 24, 0));
contentPane.add(jiaoshui, new GridBagConstraints(4, 4, 2, 1, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE,
new Insets(41, 49, 0, 95), 12, 0));
contentPane.add(jiaodian, new GridBagConstraints(4, 5, 2, 2, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE,
new Insets(32, 49, 0, 114), 27, 0));
contentPane.add(jiaowuye, new GridBagConstraints(4, 7, 2, 1, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE,
new Insets(45, 49, 0, 98), 0, 0));
{
DBConnection lianjie = new DBConnection();
Statement stat=lianjie.stat;
try{
ResultSet rst=stat.executeQuery("select * from QIANFEI");
while(rst.next())
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -