void () { boolean scriptExecutionSelected = myScriptFileRadioButton.isSelected(); myScriptFileRadioButton.setSelected(scriptExecutionSelected); myScriptPathPanel.setVisible(scriptExecutionSelected); myScriptTextRadioButton.setSelected(!scriptExecutionSelected); myScriptTextPanel.setVisible(!scriptExecutionSelected); }