Code example for JList

Methods: getSelectedValue

0
 
  protected boolean validateInputs(final boolean onConfirm)
  { 
    if (onConfirm)
    { 
      setSelectedDefinition((FieldDefinition) fieldList.getSelectedValue());
    } 
    return selectedDefinition != null;
  } 
 
  public void setFocusReturn(Component component) {
    focusReturn = component;
  } 
 
  private void close() { 
    if (focusReturn != null) {
      focusReturn.requestFocusInWindow();
    } 
  }