Class SwitchPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SwitchPane extends JPanel
This class encapsulates a list of child components which can be switched in and out, like a tab view without the tabs.
See Also:
  • Constructor Details

    • SwitchPane

      public SwitchPane()
      Creates a new SwitchPane.
  • Method Details

    • getSelectedIndex

      public int getSelectedIndex()
      Returns the currently visible pane's index in the panes list.
    • setSelectedIndex

      public void setSelectedIndex(int anIndex)
      Replaces the currently visible pane with the pane at the given index.
    • getSelectedPane

      public JComponent getSelectedPane()
      Returns the currently visible pane.
    • setSelectedPane

      public void setSelectedPane(JComponent aPane)
      Sets the given component as the selected pane.
    • getSelectedName

      public String getSelectedName()
      Returns the currently visible pane.
    • setSelectedName

      public void setSelectedName(String aName)
      Replaces the currently visible pane with the pane having the given name (if found).
    • getPane

      public JComponent getPane(String aName)
      Returns the pane with the given name.