4 import java.awt.event.ActionEvent;
5 import java.awt.event.ActionListener;
7 import javax.swing.GroupLayout;
8 import javax.swing.GroupLayout.Alignment;
9 import javax.swing.JButton;
10 import javax.swing.JFrame;
11 import javax.swing.JPanel;
12 import javax.swing.border.EmptyBorder;
16 public class HousesRelatedOwnerGUI extends JFrame {
21 private static final long serialVersionUID = 1L;
22 private JPanel contentPane;
27 public HousesRelatedOwnerGUI(Owner o) {
28 this.getContentPane().setLayout(null);
30 setBounds(100, 100, 450, 562);
31 contentPane = new JPanel();
32 contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
33 setContentPane(contentPane);
35 JButton btnCreateHouses = new JButton("Create Request");
36 btnCreateHouses.addActionListener(new ActionListener() {
37 public void actionPerformed(ActionEvent arg0) {
38 Frame a = new RequestNewHouseGUI(owner);
43 JButton btnModifyHouses = new JButton("Modify Houses");
44 btnModifyHouses.addActionListener(new ActionListener() {
45 public void actionPerformed(ActionEvent e) {
47 Frame a = new ModifyHouseGUI(owner);
53 JButton btnDeleteHouses = new JButton("Delete Request");
54 btnDeleteHouses.addActionListener(new ActionListener() {
55 public void actionPerformed(ActionEvent e) {
56 Frame a = new RequestDeleteHouseGUI(owner);
60 GroupLayout gl_contentPane = new GroupLayout(contentPane);
61 gl_contentPane.setHorizontalGroup(
62 gl_contentPane.createParallelGroup(Alignment.LEADING)
63 .addGroup(gl_contentPane.createSequentialGroup()
65 .addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)
66 .addComponent(btnDeleteHouses, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 1125, Short.MAX_VALUE)
67 .addComponent(btnModifyHouses, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 1125, Short.MAX_VALUE)
68 .addComponent(btnCreateHouses, GroupLayout.DEFAULT_SIZE, 1125, Short.MAX_VALUE))
71 gl_contentPane.setVerticalGroup(
72 gl_contentPane.createParallelGroup(Alignment.LEADING)
73 .addGroup(gl_contentPane.createSequentialGroup()
75 .addComponent(btnCreateHouses, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE)
77 .addComponent(btnModifyHouses, GroupLayout.PREFERRED_SIZE, 57, GroupLayout.PREFERRED_SIZE)
79 .addComponent(btnDeleteHouses, GroupLayout.PREFERRED_SIZE, 54, GroupLayout.PREFERRED_SIZE)
80 .addContainerGap(394, Short.MAX_VALUE))
82 contentPane.setLayout(gl_contentPane);