public boolean isOptionChecked(int index){
  if (index >= checkboxPanel.getComponents().length) {
    return false;
  }
  JCheckBox checkbox=(JCheckBox)checkboxPanel.getComponent(index);
  if (checkbox.isSelected()) {
    return true;
  }
 else {
    return false;
  }
}

public boolean isOptionChecked ( int index ) { if ( index >= checkboxPanel . getComponents ( ) . length ) { return false ; } JCheckBox checkbox = ( JCheckBox ) checkboxPanel . getComponent ( index ) ; if ( checkbox . isSelected ( ) ) { return true ; } else { return false ; } }
checks , if the specified check box is selected .
