Buggy code:
public class BrowsePanel extends JPanel { private JPanel upperPanel ; private JPanel lowerPanel ; private JPanel leftPanel ; private JPanel lowerRightPanel ; private JTextField theField ; private JComboBox theComboBox ; private JButton OKButton ; private JScrollPane firstScrollPane ; private JScrollPane secondScrollPane ; private JLabel totalPriceLabel ; private JLabel customerCarrier ; private JLabel filler1 ; private JLabel filler2 ; private JLabel filler3 ; private JLabel upperLabel ; private JLabel lowerLabel ; private JButton buyButton ; private JTable upperTable ; private JTable lowerTable ; private int price ; public int getprice ( ) { } public void setprice ( int price ) { } public BrowsePanel ( ) { } public void initActions ( ) { } public void addOkButtonListener ( ActionListener al ) { } public void addBuyButtonListener ( ActionListener al ) { } public void initBrowse ( ) { setBorder ( new EmptyBorder ( 10 , 10 , 10 , 10 ) ) ; <START_BUG> setLayout ( new BorderLayout ( ) ) ; <END_BUG> upperPanel = new JPanel ( new GridLayout ( 1 , 6 , 10 , 10 ) ) ; lowerPanel = new JPanel ( new BorderLayout ( ) ) ; lowerRightPanel = new JPanel ( new GridLayout ( 1 , 2 , 10 , 10 ) ) ; leftPanel = new JPanel ( new GridLayout ( 2 , 1 , 15 , 15 ) ) ; theField = new JTextField ( ) ; upperPanel . add ( theField ) ; theField . setColumns ( 7 ) ; String [ ] stringsForBox = new String [ ] { "Hey" , "Ho" , "Yo" , "Wut" } ; theComboBox = new JComboBox ( stringsForBox ) ; upperPanel . add ( theComboBox ) ; OKButton = new JButton ( "OK" ) ; upperPanel . add ( OKButton ) ; filler1 = new JLabel ( "" ) ; upperPanel . add ( filler1 ) ; filler2 = new JLabel ( "" ) ; upperPanel . add ( filler2 ) ; filler3 = new JLabel ( "" ) ; upperPanel . add ( filler3 ) ; totalPriceLabel = new JLabel ( ( ( "Totalt<seq2seq4repair_space>pris<seq2seq4repair_space>:<seq2seq4repair_space>" + ( price ) ) + "<seq2seq4repair_space>" ) ) ; lowerRightPanel . add ( totalPriceLabel ) ; buyButton = new JButton ( "Köp" ) ; lowerRightPanel . add ( buyButton ) ; upperLabel = new JLabel ( "Put<seq2seq4repair_space>stuff<seq2seq4repair_space>here" ) ; upperLabel . setPreferredSize ( new Dimension ( 180 , 100 ) ) ; lowerLabel = new JLabel ( "Here<seq2seq4repair_space>too" ) ; lowerLabel . setPreferredSize ( new Dimension ( 180 , 100 ) ) ; firstScrollPane = new JScrollPane ( upperLabel ) ; firstScrollPane . setHorizontalScrollBarPolicy ( JScrollPane . HORIZONTAL_SCROLLBAR_ALWAYS ) ; firstScrollPane . setVerticalScrollBarPolicy ( JScrollPane . VERTICAL_SCROLLBAR_ALWAYS ) ; firstScrollPane . setViewportBorder ( new LineBorder ( Color . BLUE ) ) ; secondScrollPane = new JScrollPane ( lowerLabel ) ; secondScrollPane . setHorizontalScrollBarPolicy ( JScrollPane . HORIZONTAL_SCROLLBAR_ALWAYS ) ; secondScrollPane . setVerticalScrollBarPolicy ( JScrollPane . VERTICAL_SCROLLBAR_ALWAYS ) ; secondScrollPane . setViewportBorder ( new LineBorder ( Color . BLUE ) ) ; leftPanel . add ( firstScrollPane ) ; leftPanel . add ( secondScrollPane ) ; lowerPanel . add ( lowerRightPanel , BorderLayout . LINE_END ) ; this . add ( upperPanel , BorderLayout . NORTH ) ; this . add ( lowerPanel , BorderLayout . SOUTH ) ; this . add ( leftPanel , BorderLayout . LINE_START ) ; setVisible ( true ) ; } }

Fix:
setLayout ( new BorderLayout ( 10 , 20 ) ) ;