question: private JPanel createLeftSide ( ) { JPanel leftPanel = new JPanel ( ) ; listModel = new CustomListModel ( ) ; leftPanel . setLayout ( new BorderLayout ( ) ) ; listBox = new JList < String > ( listModel ) ; listBox . setCellRenderer ( new JlistRenderer ( ) ) ; listBox . setSelectionMode ( ListSelectionModel . SINGLE_SELECTION ) ; listBox . addListSelectionListener ( new CustomListSelectionListener ( ) ) ; JScrollPane scrollPane = new JScrollPane ( listBox ) ; scrollPane . setBorder ( BorderFactory . createEmptyBorder ( ) ) ; leftPanel . add ( scrollPane , BorderLayout . CENTER ) ; scrollPane . setBorder ( BorderFactory . createTitledBorder ( "Dialogue states:" ) ) ; JPanel controlPanel = createControlPanel ( ) ; leftPanel . add ( controlPanel , BorderLayout . SOUTH ) ; return leftPanel ; }
target:  Creates the panel on the left side of the window