Buggy code:
public class TestActionGui extends AbstractSamplerGui { private JComboBox targetBox ; private JRadioButton pauseButton ; private JRadioButton stopButton ; private JTextField durationField ; private int target ; private int action ; private int duration ; private static final String targetLabel = JMeterUtils . getResString ( "test_action_target" ) ; private static final String threadTarget = JMeterUtils . getResString ( "test_action_target_thread" ) ; private static final String testTarget = JMeterUtils . getResString ( "test_action_target_test" ) ; private static final String actionLabel = JMeterUtils . getResString ( "test_action_action" ) ; private static final String pauseAction = JMeterUtils . getResString ( "test_action_pause" ) ; private static final String stopAction = JMeterUtils . getResString ( "test_action_stop" ) ; private static final String durationLabel = JMeterUtils . getResString ( "test_action_duration" ) ; public TestActionGui ( ) { } public String getLabelResource ( ) { } public void configure ( TestElement element ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement element ) { } public void clear ( ) { } private void init ( ) { <START_BUG> setLayout ( new VerticalLayout ( 5 , VerticalLayout . LEFT , VerticalLayout . TOP ) ) ; <END_BUG> setBorder ( makeBorder ( ) ) ; add ( makeTitlePanel ( ) ) ; HorizontalPanel targetPanel = new HorizontalPanel ( ) ; targetPanel . add ( new JLabel ( TestActionGui . targetLabel ) ) ; DefaultComboBoxModel targetModel = new DefaultComboBoxModel ( ) ; targetModel . addElement ( TestActionGui . threadTarget ) ; targetModel . addElement ( TestActionGui . testTarget ) ; targetBox = new JComboBox ( targetModel ) ; targetBox . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { if ( ( ( String ) ( targetBox . getSelectedItem ( ) ) ) . equals ( TestActionGui . threadTarget ) ) { target = TestAction . THREAD ; } else { target = TestAction . TEST ; } } } ) ; targetPanel . add ( targetBox ) ; add ( targetPanel ) ; HorizontalPanel actionPanel = new HorizontalPanel ( ) ; ButtonGroup actionButtons = new ButtonGroup ( ) ; pauseButton = new JRadioButton ( TestActionGui . pauseAction , true ) ; pauseButton . addChangeListener ( new ChangeListener ( ) { public void stateChanged ( ChangeEvent e ) { if ( pauseButton . isSelected ( ) ) { action = TestAction . PAUSE ; durationField . setEnabled ( true ) ; } } } ) ; stopButton = new JRadioButton ( TestActionGui . stopAction , false ) ; stopButton . addChangeListener ( new ChangeListener ( ) { public void stateChanged ( ChangeEvent e ) { if ( stopButton . isSelected ( ) ) { action = TestAction . STOP ; durationField . setEnabled ( false ) ; } } } ) ; actionButtons . add ( pauseButton ) ; actionButtons . add ( stopButton ) ; actionPanel . add ( new JLabel ( TestActionGui . actionLabel ) ) ; actionPanel . add ( pauseButton ) ; actionPanel . add ( stopButton ) ; add ( actionPanel ) ; HorizontalPanel durationPanel = new HorizontalPanel ( ) ; durationField = new JTextField ( 5 ) ; durationField . setText ( Integer . toString ( duration ) ) ; durationField . addFocusListener ( new FocusListener ( ) { public void focusLost ( FocusEvent e ) { try { duration = Integer . parseInt ( durationField . getText ( ) ) ; } catch ( NumberFormatException nfe ) { duration = 0 ; } } public void focusGained ( FocusEvent e ) { } } ) ; durationPanel . add ( new JLabel ( TestActionGui . durationLabel ) ) ; durationPanel . add ( durationField ) ; add ( durationPanel ) ; } }

Fix:
setLayout ( new VerticalLayout ( 5 , VerticalLayout . BOTH , VerticalLayout . TOP ) ) ;