add(myButtonPanel, BorderLayout.NORTH); add(myStromaPanel, BorderLayout.EAST); add(myLumenPanel, BorderLayout.WEST);
GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints c = new GridBagConstraints(); setLayout(gridbag);  c.fill = GridBagConstraints.BOTH; c.gridheight = 1; c.weightx = 0.1; c.weighty = 0.1; c.gridwidth = GridBagConstraints.REMAINDER; gridbag.setConstraints(myButtonPanel, c); add(myButtonPanel);  c.fill = GridBagConstraints.BOTH; c.gridheight = 2; c.weightx = 1; c.weighty = 1; c.gridwidth = GridBagConstraints.RELATIVE; gridbag.setConstraints(myStromaPanel, c); add(myStromaPanel);  c.fill = GridBagConstraints.BOTH; c.gridheight = 1; c.weightx = 1; c.weighty = 1; c.gridwidth = GridBagConstraints.REMAINDER; gridbag.setConstraints(myLumenPanel, c); add(myLumenPanel);
    private void buildGUI() {        loadIcons();        //Actions        myTickButton = new JButton(new TickButtonAction());        myTickButton.setIcon(myTickIcon);        myPlayPauseButton = new JButton(new PlayPauseButtonAction());        myPlayPauseButton.setIcon(myPlayIcon);        myButtonPanel.add(myPlayPauseButton);        myButtonPanel.add(myTickButton);        myButtonPanel.setBorder(BorderFactory.createTitledBorder("Actions"));        myStromaPanel = new StromaPanel(myChloroplast.getStroma());        myStromaPanel.setBorder(BorderFactory.createTitledBorder("Stroma"));        myLumenPanel = new LumenPanel(myChloroplast.getThylakoid().getLumen());        myLumenPanel.setBorder(BorderFactory.createTitledBorder("Lumen"));        add(myButtonPanel, BorderLayout.NORTH);        add(myStromaPanel, BorderLayout.EAST);        add(myLumenPanel, BorderLayout.WEST);    }