3 import java.awt.BorderLayout;
4 import java.awt.EventQueue;
6 import javax.swing.JFrame;
7 import javax.swing.JPanel;
8 import javax.swing.border.EmptyBorder;
9 import javax.swing.JLabel;
13 import javax.swing.JTextField;
14 import javax.swing.JScrollPane;
16 import java.awt.Rectangle;
18 import javax.swing.JTable;
19 import javax.swing.table.DefaultTableModel;
21 import java.awt.Component;
23 import javax.swing.Box;
25 public class listOfHousesGUI extends JFrame {
27 private JPanel contentPane;
28 private JTextField textField;
34 public listOfHousesGUI() {
37 } catch (Exception e) {
42 private void init() throws Exception
44 setBounds(100, 100, 600, 450);
45 contentPane = new JPanel();
46 contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
47 setContentPane(contentPane);
48 contentPane.setLayout(null);
50 JLabel lblNewLabel = new JLabel("List of available houses in:");
51 lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 27));
52 lblNewLabel.setBounds(23, 41, 325, 33);
53 contentPane.add(lblNewLabel);
55 textField = new JTextField();
56 textField.setEnabled(false);
57 textField.setEditable(false);
58 textField.setFont(new Font("Tahoma", Font.PLAIN, 27));
59 textField.setBounds(373, 41, 152, 33);
60 contentPane.add(textField);
61 textField.setColumns(10);
63 JScrollPane scrollPane = new JScrollPane();
64 scrollPane.setBounds(new Rectangle(45, 305, 320, 116));
65 scrollPane.setBounds(23, 113, 536, 271);
66 contentPane.add(scrollPane);
69 scrollPane.setViewportView(table);
70 table.setModel(new DefaultTableModel(
74 "House Name", "Bedrooms", "Kitchens", "Baths", "Parkings", "Livings"