public void windowLayout() { // Default layout of window this.getContentPane().setLayout(new BorderLayout()); // Left side of window JPanel contentLeft = new JPanel(new BorderLayout()); this.add(contentLeft, BorderLayout.WEST); contentLeft.setBorder(BorderFactory.createEmptyBorder(20, 15, 10, 15)); // Adding search function JPanel leftTop = new JPanel(new FlowLayout()); contentLeft.add(leftTop, BorderLayout.NORTH); JLabel searchLabel = new JLabel("Search: "); searchLabel.setFont(new Font("Arial", Font.BOLD, 18)); leftTop.add(searchLabel); leftTop.add(searchFunction()); // Adding temperature buttons JRadioButton celsius = new JRadioButton("Celsius"); JRadioButton fahren = new JRadioButton("Fahrenheit"); ButtonGroup temperature = new ButtonGroup(); temperature.add(fahren); temperature.add (celsius); JPanel leftCenter = new JPanel(new BorderLayout()); contentLeft.add(leftCenter, BorderLayout.CENTER); JPanel leftMid = new JPanel(new GridLayout(1,2,0,0)); leftCenter.add(leftMid); leftMid.add(celsius); leftMid.add(fahren); // Adding search list JLabel areaLabel = new JLabel("Possible Weather Stations: "); areaLabel.setFont(new Font("Arial", Font.BOLD, 18)); JPanel leftDown = new JPanel(new FlowLayout()); leftCenter.add(leftDown, BorderLayout.SOUTH); leftDown.add(areaLabel); JPanel leftBottom = new JPanel(new FlowLayout()); contentLeft.add(leftBottom, BorderLayout.SOUTH); leftBottom.add(new JScrollPane(searchList(),ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS)); // Adding the text areas for the 3-day forecast JPanel jpRight = new JPanel(new GridLayout(3,1,10,10)); this.add(jpRight, BorderLayout.EAST); jpRight.setBorder(BorderFactory.createEmptyBorder(30, 35, 20, 25)); jpRight.add(dayOne()); jpRight.add(dayTwo()); jpRight.add(dayThree()); } protected Component searchFunction() { JTextField areaSearch = new JTextField(20); return areaSearch; } public Component searchList() { JList areaList = new JList(); areaList.setVisibleRowCount(6); areaList.setFixedCellWidth(300); areaList.setBorder(BorderFactory.createLineBorder(Color.black, 1)); areaList.setSize(100,100); return areaList; } public Component dayOne() { JTextArea day1 = new JTextArea(4,29); day1.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1)); return day1; } public Component dayTwo() { JTextArea day2 = new JTextArea(4,29); day2.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1)); return day2; } public Component dayThree() { JTextArea day3 = new JTextArea(4,29); day3.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1)); return day3; }