X-Git-Url: https://xp-dev.com/git/RRRRHHHH_Code/blobdiff_plain/8012b0705115c528000283ebc302a16837143d6e..076d768e70e04655a2c343f46d0808c16a27130c:/ruralHouses/src/gui/OwnerMenuGUI.java diff --git a/ruralHouses/src/gui/OwnerMenuGUI.java b/ruralHouses/src/gui/OwnerMenuGUI.java deleted file mode 100644 index 244b242..0000000 --- a/ruralHouses/src/gui/OwnerMenuGUI.java +++ /dev/null @@ -1,87 +0,0 @@ -package gui; - -import java.awt.Frame; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import javax.swing.GroupLayout; -import javax.swing.GroupLayout.Alignment; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JPanel; -import javax.swing.LayoutStyle.ComponentPlacement; -import javax.swing.border.EmptyBorder; - -import domain.Owner; - -public class OwnerMenuGUI extends JFrame { - - /** - * - */ - private static final long serialVersionUID = 1L; - private JPanel contentPane; - private Owner owner; - - - /** - * Create the frame. - */ - public OwnerMenuGUI(Owner o) { - this.setTitle("Owner Menu"); - this.getContentPane().setLayout(null); - owner = o; - setBounds(100, 100, 450, 473); - contentPane = new JPanel(); - contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); - setContentPane(contentPane); - - JButton btnHouses = new JButton("Houses"); - btnHouses.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - Frame a = new HousesRelatedOwnerGUI(owner); - a.setVisible(true); - } - }); - - JButton btnOffers = new JButton("Offers"); - btnOffers.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - Frame a = new OffersRelatedOwnerGUI(owner); - a.setVisible(true); - } - }); - - JButton btnBookings = new JButton("Bookings"); - btnBookings.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - Frame a = new listOfOffers(owner); - a.setVisible(true); - } - }); - GroupLayout gl_contentPane = new GroupLayout(contentPane); - gl_contentPane.setHorizontalGroup( - gl_contentPane.createParallelGroup(Alignment.LEADING) - .addGroup(gl_contentPane.createSequentialGroup() - .addGap(115) - .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING, false) - .addComponent(btnBookings, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(btnOffers, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE) - .addComponent(btnHouses, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)) - .addContainerGap(145, Short.MAX_VALUE)) - ); - gl_contentPane.setVerticalGroup( - gl_contentPane.createParallelGroup(Alignment.LEADING) - .addGroup(gl_contentPane.createSequentialGroup() - .addGap(62) - .addComponent(btnHouses, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE) - .addGap(58) - .addComponent(btnOffers, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE) - .addPreferredGap(ComponentPlacement.RELATED, 50, Short.MAX_VALUE) - .addComponent(btnBookings, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - ); - contentPane.setLayout(gl_contentPane); - } - -}