JPanel () { myList = createTargetVariableChooser(); final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myList); final JPanel hBox = new JPanel(new GridBagLayout()); final GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.fill = GridBagConstraints.BOTH; gbConstraints.weightx = 1; gbConstraints.weighty = 1; gbConstraints.gridheight = 1; gbConstraints.gridx = 0; gbConstraints.gridy = 0; gbConstraints.insets = JBInsets.emptyInsets(); hBox.add(scrollPane, gbConstraints); hBox.add(Box.createHorizontalStrut(4)); gbConstraints.weightx = 0; gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.NORTH; gbConstraints.gridx++; myVisibilityPanel = createVisibilityPanel(); hBox.add (myVisibilityPanel, gbConstraints); return hBox; }