private JPanel prepareParamControls(JTextField posStart, JTextField posEnd,
      final JTextField winSize, final JTextField shiftIncr, JCheckBox useSlide)
  {
    JPanel controlField = new JPanel(), startField = new JPanel(), endField = new JPanel(), checkBoxField = new JPanel(), windowField = new JPanel(), shiftField = new JPanel();
    final JPanel slideFields = new JPanel();

    /*
     * Position based parameters
     */
    startField.setLayout(new FlowLayout(FlowLayout.LEADING));
    startField.add(new JLabel("Start Position:"));
    startField.add(posStart);

    endField.setLayout(new FlowLayout(FlowLayout.LEADING));
    endField.add(new JLabel("End Position:"));
    endField.add(posEnd);

    /*
     * Fancy check box for making window parameters visible/invisible
     */
    checkBoxField.setLayout(new FlowLayout(FlowLayout.LEADING));
    checkBoxField.add(useSlide);
    useSlide.addItemListener(new ItemListener()
    {
      public void itemStateChanged(ItemEvent e)
      {
        if (e.getStateChange() == ItemEvent.SELECTED)
        {
          slideFields.setVisible(true);
        }
        else if (e.getStateChange() == ItemEvent.DESELECTED)
        {
          slideFields.setVisible(false);
          winSize.setText("");
          shiftIncr.setText("");
        }

        mPane.setVisible(true);
      }
    });

    /*
     * Window Parameters
     */
    windowField.setLayout(new FlowLayout(FlowLayout.LEADING));
    windowField.add(new JLabel("Window Size"));
    windowField.add(winSize);

    shiftField.setLayout(new FlowLayout(FlowLayout.LEADING));
    shiftField.add(new JLabel("Window Shift"));
    shiftField.add(shiftIncr);

    slideFields.setLayout(new BoxLayout(slideFields, BoxLayout.Y_AXIS));
    slideFields.add(windowField);
    slideFields.add(shiftField);
    slideFields.setVisible(false);

    /*
     * Putting all parameter inputs together
     */
    controlField.setLayout(new BoxLayout(controlField, BoxLayout.Y_AXIS));
    controlField.add(startField);
    controlField.add(endField);
    controlField.add(checkBoxField);
    controlField.add(slideFields);

    return controlField;
  }