——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明










基于java的Swing小区物业管理系统(java+swing+mysql+jdbc)
启动类:StartApplication.java
登录:
admin 123456
包含登录,缴费,报修,投诉,修改个人信息等
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| } public String getChargeName() { return chargeName; } public void setChargeName(String chargeName) { this.chargeName = chargeName; }
public String getDate() { return date; } public void setDate(String date) { this.date = date; }
public String getHouseID() { return houseID; }
public void setHouseID(String houseID) { this.houseID = houseID; }
public String getMoney() { return money; } public void setMoney(String money) { this.money = money; }
public String getMuch() { return much; } public void setMuch(String much) { this.much = much; }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| }
public String getMuch() { return much; } public void setMuch(String much) { this.much = much; }
public String getOwnerName() { return ownerName; } public void setOwnerName(String ownerName) { this.ownerName = ownerName; }
public String getReceiver() { return receiver; } public void setReceiver(String receiver) { this.receiver = receiver; }
public static Vector charge3query(String ownerName) { Connection con=ConnectServer.connect("jdbc:odbc:yzgl","",""); PreparedStatement pstmt=null; ResultSet rs=null; Vector v=new Vector(); if(con==null) { return v; } try { pstmt=con.prepareStatement("select * from charge3 where ownerName=?");
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| pstmt.setString(1,this.houseID); pstmt.setString(2,this.ownerName); pstmt.setString(3,this.chargeName); pstmt.setString(4,this.much); pstmt.setString(5,this.money); pstmt.setString(6,this.date); pstmt.setString(7,this.receiver); pstmt.execute(); } catch(SQLException e) { return false; } finally { try { pstmt.close(); con.close(); } catch(SQLException eee){} } return true; }
public boolean delete() { Connection con=ConnectServer.connect("jdbc:odbc:yzgl","",""); PreparedStatement pstmt=null; if(con==null) { return false; } try { pstmt=con.prepareStatement("delete from charge3 where ownerName=?"); pstmt.setString(1,ownerName); pstmt.execute(); } catch(SQLException e) { return false; } finally { try {
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| Container c=this.getContentPane(); this.user=user; this.setTitle("小区物业管理系统 v1.0"); setIconImage(Toolkit.getDefaultToolkit().getImage(".\\image\\3.jpg")); createMenu(); createToolBar(); back=new MyPanel(); st=new time(); st.setStatus("欢迎使用小区物业管理系统"); back.addMouseMotionListener(new task(this)); toolbar.addMouseMotionListener(new task(this)); c.add(back,"Center"); c.add(st,"South"); this.setSize(700,500); Dimension screen=Toolkit.getDefaultToolkit().getScreenSize(); this.setLocation((screen.width-getWidth())/2,(screen.height-getHeight())/2); this.show(); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public void createMenu() { menubar=new JMenuBar(); menu1=new JMenu("管理员设置(G)"); menu1.setMnemonic('G'); menu2=new JMenu("系统设置(V)"); menu2.setMnemonic('V'); menu3=new JMenu("业主信息管理(Y)"); menu3.setMnemonic('Y'); menu4=new JMenu("物业信息管理(S)"); menu4.setMnemonic('S'); menu5=new JMenu("房屋信息管理(F)"); menu5.setMnemonic('F'); menu6=new JMenu("关于(B)"); menu6.setMnemonic('B');
item12=new JMenuItem("添加管理员(G)",new ImageIcon(".\\image\\8.jpg")); item12.setMnemonic('G'); item12.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_G,2)); item13=new JMenuItem("修改密码(M)",new ImageIcon(".\\image\\13.jpg")); item13.setMnemonic('M'); item13.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M,2));
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| return this.complainID; } public void setHouseID(String houseID) { this.houseID=houseID; } public String getHouseID() { return this.houseID; } public void setComplainItem(String complainItem) { this.complainItem=complainItem; } public String getComplainItem() { return this.complainItem; }
public void setComplainDate(String complainDate) { this.complainDate=complainDate; } public String getComplainDate() { return this.complainDate; } public void setFinish(String finish) { this.finish=finish; } public String getFinish() { return this.finish; }
public void setReceiver(String receiver) { this.receiver=receiver; } public String getReceiver() { return this.receiver; }
public static Vector complainquery(String houseID) { Connection con=ConnectServer.connect("jdbc:odbc:yzgl","",""); PreparedStatement pstmt=null;
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| } } } class Charge1add extends JDialog implements ActionListener { JTextField houseID; JTextField ownerName; JTextField chargeName; JTextField much; JTextField money; JTextField date; JTextField receiver; JButton btnOk,btnCancel; Charge1data c1; String mode1; String mode2; Vector vsp; Charge1add(String mode1,String mode2) { this.mode1=mode1; this.mode2=mode2; Container c=this.getContentPane(); houseID=new JTextField(13); ownerName=new JTextField(13); chargeName=new JTextField(13); much=new JTextField(13); money=new JTextField(13); date=new JTextField(13); receiver=new JTextField(13); btnOk=new JButton("确定"); btnCancel=new JButton("取消"); JPanel bottom=new JPanel(new FlowLayout(FlowLayout.CENTER,5,0)); JPanel center=new JPanel(new BorderLayout()); JPanel top=new JPanel(new GridLayout(4,2)); JPanel topleft0=new JPanel(new FlowLayout(FlowLayout.LEFT,5,0)); JPanel topleft1=new JPanel(new FlowLayout(FlowLayout.LEFT,5,0));
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=472024490503201la
https://javayms.pages.dev?id=472024490503201la