Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions 7b7027 ... vs a92725 ... for ruralHouses/src/gui/HousesRelatedOwnerGUI.java

Diff revisions: vs.
  @@ -2,6 +2,7 @@
2 2
3 3 import java.awt.BorderLayout;
4 4 import java.awt.EventQueue;
5 + import java.awt.Frame;
5 6
6 7 import javax.swing.JFrame;
7 8 import javax.swing.JPanel;
  @@ -34,7 +35,6 @@
34 35 public HousesRelatedOwnerGUI(Owner o) {
35 36 this.getContentPane().setLayout(null);
36 37 owner = o;
37 - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
38 38 setBounds(100, 100, 450, 562);
39 39 contentPane = new JPanel();
40 40 contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
  @@ -43,54 +43,52 @@
43 43 JButton btnCreateHouses = new JButton("Create Houses");
44 44 btnCreateHouses.addActionListener(new ActionListener() {
45 45 public void actionPerformed(ActionEvent arg0) {
46 - //TODO this button must direct to the House create GUI
46 + Frame a = new NewHouseGUI(owner);
47 + a.setVisible(true);
47 48 }
48 49 });
49 50
50 51 JButton btnModifyHouses = new JButton("Modify Houses");
52 + btnModifyHouses.setEnabled(false);
51 53 btnModifyHouses.addActionListener(new ActionListener() {
52 54 public void actionPerformed(ActionEvent e) {
53 - //TODO this button must direct to the House modify GUI
55 +
56 + /* TODO to be implemented in a future.
57 + Frame a = new ModifyHouseGUI(owner);
58 + a.setVisible(true);
59 + */
54 60 }
55 61 });
56 62
57 63 JButton btnDeleteHouses = new JButton("Delete Houses");
64 + btnDeleteHouses.setEnabled(false);
58 65 btnDeleteHouses.addActionListener(new ActionListener() {
59 66 public void actionPerformed(ActionEvent e) {
60 - //TODO this button must direct to the House delete GUI
67 + Frame a = new DeleteHouseGUI(owner);
68 + a.setVisible(true);
61 69 }
62 70 });
63 -
64 - JLabel lblDisabledYet = new JLabel("Disabled yet");
65 - lblDisabledYet.setFont(new Font("Courier New", Font.PLAIN, 19));
66 - lblDisabledYet.setForeground(Color.RED);
67 71 GroupLayout gl_contentPane = new GroupLayout(contentPane);
68 72 gl_contentPane.setHorizontalGroup(
69 - gl_contentPane.createParallelGroup(Alignment.TRAILING)
73 + gl_contentPane.createParallelGroup(Alignment.LEADING)
70 74 .addGroup(gl_contentPane.createSequentialGroup()
71 75 .addGap(110)
72 76 .addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)
73 - .addComponent(btnDeleteHouses, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
74 - .addComponent(btnModifyHouses, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
75 - .addComponent(btnCreateHouses, GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
77 + .addComponent(btnDeleteHouses, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 1125, Short.MAX_VALUE)
78 + .addComponent(btnModifyHouses, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 1125, Short.MAX_VALUE)
79 + .addComponent(btnCreateHouses, GroupLayout.DEFAULT_SIZE, 1125, Short.MAX_VALUE))
76 80 .addGap(121))
77 - .addGroup(Alignment.LEADING, gl_contentPane.createSequentialGroup()
78 - .addGap(127)
79 - .addComponent(lblDisabledYet)
80 - .addContainerGap(165, Short.MAX_VALUE))
81 81 );
82 82 gl_contentPane.setVerticalGroup(
83 83 gl_contentPane.createParallelGroup(Alignment.LEADING)
84 84 .addGroup(gl_contentPane.createSequentialGroup()
85 - .addGap(37)
86 - .addComponent(lblDisabledYet)
87 - .addGap(28)
85 + .addGap(88)
88 86 .addComponent(btnCreateHouses, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE)
89 87 .addGap(40)
90 88 .addComponent(btnModifyHouses, GroupLayout.PREFERRED_SIZE, 57, GroupLayout.PREFERRED_SIZE)
91 89 .addGap(39)
92 90 .addComponent(btnDeleteHouses, GroupLayout.PREFERRED_SIZE, 54, GroupLayout.PREFERRED_SIZE)
93 - .addContainerGap(186, Short.MAX_VALUE))
91 + .addContainerGap(394, Short.MAX_VALUE))
94 92 );
95 93 contentPane.setLayout(gl_contentPane);
96 94 }