房产管理系统

  • P4_930133
    了解作者
  • 444.9KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-05 08:33
    上传日期
房产管理系统(Java)
房产管理系统.rar
  • 房产管理系统
  • bin
  • StudentMSN
  • HouseFrame.class
    13.4KB
  • FamilyFrame$1.class
    649B
  • HouseFrame$2.class
    2.3KB
  • OwneFrame$2.class
    1.9KB
  • QueryFrame.class
    11.5KB
  • DBManager.class
    2.7KB
  • CodeFrame$2.class
    1.4KB
  • MyLabel.class
    3.7KB
  • CodeFrame.class
    8.6KB
  • OwneFrame.class
    10.2KB
  • HouseFrame$1.class
    643B
  • BuidFrame.class
    11.4KB
  • FamilyFrame.class
    11.1KB
  • BuidFrame$1.class
    637B
  • OwneFrame$1.class
    637B
  • HMAGlingo.class
    4.9KB
  • FamilyFrame$2.class
    1.9KB
  • BuidFrame$2.class
    2KB
  • QueryFrame$1.class
    643B
  • CodeFrame$1.class
    637B
  • 房产管理系统050711.doc
    511.5KB
  • House.mdb
    808KB
  • house.ldf
    2MB
  • src
  • StudentMSN
  • FamilyFrame.java
    11.1KB
  • DBManager.java
    2.1KB
  • CodeFrame.java
    8KB
  • BuidFrame.java
    11.7KB
  • HMAGlingo.java
    3.8KB
  • OwneFrame.java
    9.7KB
  • HouseFrame.java
    14.7KB
  • MyLabel.java
    3.1KB
  • QueryFrame.java
    10.5KB
  • .project
    385B
  • .classpath
    232B
  • house.mdf
    2MB
内容介绍
package StudentMSN; import java.awt.BorderLayout; import java.awt.Container; import java.awt.GridLayout; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.sql.ResultSet; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.ScrollPaneConstants; import javax.swing.table.DefaultTableModel; public class HouseFrame extends JFrame implements ActionListener { JLabel hlb1 = new JLabel("房屋坐落:", JLabel.LEFT); JLabel hlb2 = new JLabel("房 间 号:", JLabel.LEFT); JLabel hlb3 = new JLabel("朝 向:", JLabel.CENTER); JLabel hlb4 = new JLabel("间 数:", JLabel.LEFT); JLabel hlb5 = new JLabel("使用方法:", JLabel.CENTER); JLabel hlb6 = new JLabel("购房时间:", JLabel.LEFT); JLabel hlb7 = new JLabel("购房价格:", JLabel.CENTER); JLabel hlb8 = new JLabel("建筑面积:", JLabel.LEFT); JLabel hlb9 = new JLabel("阳台面积:", JLabel.CENTER); JLabel hlb10 = new JLabel("住 户:", JLabel.LEFT); JTextField htxt1 = new JTextField(10); JTextField htxt2 = new JTextField(10); JTextField htxt3 = new JTextField(10); JTextField htxt4 = new JTextField(10); JTextField htxt5 = new JTextField(10); JTextField htxt6 = new JTextField(10); JTextField htxt7 = new JTextField(10); JComboBox hcb1 = new JComboBox(); JComboBox hcb2 = new JComboBox(); JComboBox hcb3 = new JComboBox(); DefaultTableModel model = new DefaultTableModel(); JTable htb = new JTable(model); JScrollPane hsp = new JScrollPane(htb, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); JButton hbtquery = new JButton("查询记录"); JButton hbtadd = new JButton("增加"); JButton hbtupd = new JButton("修改"); JButton hbtdel = new JButton("删除"); JButton hbtsave = new JButton("保存"); JButton hbtexit = new JButton("退出"); Container c = this.getContentPane(); JLabel hlbf[] = new JLabel[16]; JPanel p1 = new JPanel(new BorderLayout()); JPanel p2 = new JPanel(); JPanel p3 = new JPanel(new GridLayout(2, 1)); JPanel p4 = new JPanel(new BorderLayout()); JPanel p5 = new JPanel(new BorderLayout()); JPanel p7 = new JPanel(new GridLayout(6, 4, 0, 5)); JPanel p8 = new JPanel(new BorderLayout()); DBManager mdb = new DBManager("house", "sa", ""); String ohcb1, ohtxt1, ohcb2, ohtxt2, ohcb3, ohtxt3, ohtxt4, ohtxt5, ohtxt6, ohtxt7; String[] colh = { "房屋坐落", "房间号", "朝向", "房间数", "使用方法", "购房时间", "购房价格", "建筑面积", "阳台面积", "住户" }; String gethcb1, gethtxt1, gethcb2, gethtxt2, gethcb3, gethtxt3, gethtxt4, gethtxt5, gethtxt6, gethtxt7; int htbid; int count; public HouseFrame() { setTitle("住房信息维护"); for (int i = 0; i < 16; i++) hlbf[i] = new JLabel(" "); c.add(hlbf[0], "North"); c.add(p2, "South"); p2.add(hbtquery); p2.add(hbtadd); p2.add(hbtupd); p2.add(hbtdel); p2.add(hbtsave); p2.add(hbtexit); c.add(hlbf[1], "East"); c.add(hlbf[2], "West"); p1.setBorder(BorderFactory.createBevelBorder(1)); c.add(p1, "Center"); p1.add(hlbf[3], "East"); p1.add(hlbf[4], "West"); p1.add(p3, "Center"); p3.add(p8); p8.add(hlbf[6], "North"); p8.add(hlbf[8], "East"); p8.add(hlbf[9], "West"); p8.add(p7, "Center"); p8.add(p7, "Center"); p7.add(hlb1); String hcb1vul[] = mdb.getColumns("select Location from BuildInfo", 1); for (int i = 0; i < hcb1vul.length; i++) hcb1.addItem(hcb1vul[i]); hcb1.setSelectedItem(null); p7.add(hcb1); p7.add(hlbf[5]); p7.add(hlbf[12]); String hcb2vul[] = mdb.getColumns("select DESCRIPTION from Heading", 1); for (int i = 0; i < hcb2vul.length; i++) hcb2.addItem(hcb2vul[i]); hcb2.setSelectedItem(null); p7.add(hlb2); p7.add(htxt1); String hcb3vul[] = mdb.getColumns("select DESCRIPTION from UseType", 1); for (int i = 0; i < hcb3vul.length; i++) hcb3.addItem(hcb3vul[i]); hcb3.setSelectedItem(null); p7.add(hlb3); p7.add(hcb2); p7.add(hlb4); p7.add(htxt2); p7.add(hlb5); p7.add(hcb3); p7.add(hlb6); p7.add(htxt3); p7.add(hlb7); p7.add(htxt4); p7.add(hlb8); p7.add(htxt5); p7.add(hlb9); p7.add(htxt6); p7.add(hlb10); p7.add(htxt7); p7.add(hlbf[10]); p7.add(hlbf[11]); p3.add(p5); p5.add(hlbf[7], "East"); p5.add(hlbf[7], "West"); p5.add(hsp, "Center"); htxt1.setEnabled(false); htxt2.setEnabled(false); htxt3.setEnabled(false); htxt4.setEnabled(false); htxt5.setEnabled(false); htxt6.setEnabled(false); htxt7.setEnabled(false); hcb1.setEnabled(false); hcb2.setEnabled(false); hcb3.setEnabled(false); hbtupd.setEnabled(false); hbtdel.setEnabled(false); hbtsave.setEnabled(false); hbtquery.addActionListener(this); hbtadd.addActionListener(this); hbtupd.addActionListener(this); hbtdel.addActionListener(this); hbtsave.addActionListener(this); hbtexit.addActionListener(this); this.setSize(600, 400); int x = (Toolkit.getDefaultToolkit().getScreenSize().width - this .getWidth()) / 2 - 50; int y = (Toolkit.getDefaultToolkit().getScreenSize().height - this .getHeight()) / 2 - 50; this.setLocation(x, y); this.setVisible(false); this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); this.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { dispose(); // System.exit(0); } }); htb.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { int row = htb.getSelectedRow(); int colCount = htb.getColumnCount(); // System.out.println("row"+row); String[] sa = new String[colCount]; for (int col = 0; col < colCount; col++) { sa[col] = (String) htb.getValueAt(row, col); } hcb1.setSelectedIndex(Integer.parseInt(sa[0]) - 1); htxt1.setText(sa[1]); hcb2.setSelectedIndex(Integer.parseInt(sa[2]) - 1); htxt2.setText(sa[3]); hcb3.setSelectedIndex(Integer.parseInt(sa[4]) - 1); htxt3.setText(sa[5]); htxt4.setText(sa[6]); htxt5.setText(sa[7]); htxt6.setText(sa[8]); htxt7.setText(sa[9]); htbid = htb.getSelectedRow(); System.out.println(htbid); ohcb1 = String.valueOf(hcb1.getSelectedIndex() + 1); ohtxt1 = htxt1.getText(); ohcb2 = String.valueOf(hcb2.getSelectedIndex() + 1); ohtxt2 = htxt2.getText(); ohcb3 = String.valueOf(hcb2.getSelectedIndex() + 1); ohtxt3 = htxt3.getText(); ohtxt4 = htxt4.getText(); ohtxt5 = htxt5.getText(); ohtxt6 = htxt6.getText(); ohtxt7 = htxt7.getText(); } }); } public void gettxt() { gethcb1 = String.valueOf(hcb1.getSelectedIndex() + 1); gethtxt1 = htxt1.getText(); gethcb2 = String.valueOf(hcb2.getSelectedIndex() + 1); gethtxt2 = htxt2.getText(); gethcb3 = String.valueOf(hcb2.getSelectedIndex() + 1); gethtxt3 = htxt3.getText(); gethtxt4 = htxt4.getText(); gethtxt5 = htxt5.getText(); gethtxt6 = htxt6.getText(); gethtxt7 = htxt7.getText(); } public void cls() { htxt1.setText(""); htxt2.setText(""); htxt3.setText(""); htxt4.setText(""); htxt5.setText(""); htxt6.setText(""); htxt7.setText(""); hcb1.setSelectedItem(null); hcb2.setSelectedItem(null); hcb3.setSelectedItem(null); } public void actionPerformed(ActionEvent e) { String sql; if (e.getSource().equals(hbtquery)) { hcb1.setEditable(true); hcb2
评论
    相关推荐
    • Java
      Java 对于Java练习
    • java
      Java Java基础
    • Java
      Java 我创建的Java项目
    • JAVA教程
      一本非常不错的清华大学java教程,讲解非常详细,看了就知道。
    • Java Cipher
      Java Cipher 加密和解密工具 附带源码 Java Cipher 加密和解密工具 附带源码 Java Cipher 加密和解密工具 附带源码 Java Cipher 加密和解密工具 附带源码
    • javabank
      Java银行 Java com的模拟操作将在bancárias上发布! 要求:Java 8。
    • java 李兴华
      java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java 李兴华 java ...
    • Java204
      支持中文,支持动态注释的超强Java语言反编译器。 注意:Java204的工作目录中不能包含中文字符!! 支持现有所有Java环境产生的Class代码,而最重要的是它生成的源代码可读性极好,又充分考虑了国人的Java编码习惯,...
    • java程序
      java程序-吃点点java程序-吃点点java程序-吃点点java程序-吃点点java程序-吃点点java程序-吃点点
    • Java
      Java 2021/02/19 .java Main.java 学生.java Bmi.java 。班级 Bmi类 主类 MyBmi.class 学生班 学生样本类 2021/02/20 .java DeleteFile.java WriteFile.java MyDataPrint.java 。班级 DeleteFile.class ...