src/share/classes/javax/swing/JMenuBar.java

Print this page
rev 10121 : 8046485: Add missing @since tag under javax.swing.*
Reviewed-by:


  71  * has been added to the <code>java.beans</code> package.
  72  * Please see {@link java.beans.XMLEncoder}.
  73  * <p>
  74  * <strong>Warning:</strong>
  75  * By default, pressing the Tab key does not transfer focus from a <code>
  76  * JMenuBar</code> which is added to a container together with other Swing
  77  * components, because the <code>focusTraversalKeysEnabled</code> property
  78  * of <code>JMenuBar</code> is set to <code>false</code>. To resolve this,
  79  * you should call the <code>JMenuBar.setFocusTraversalKeysEnabled(true)</code>
  80  * method.
  81  * @beaninfo
  82  *   attribute: isContainer true
  83  * description: A container for holding and displaying menus.
  84  *
  85  * @author Georges Saab
  86  * @author David Karlton
  87  * @author Arnaud Weber
  88  * @see JMenu
  89  * @see JPopupMenu
  90  * @see JMenuItem

  91  */
  92 @SuppressWarnings("serial")
  93 public class JMenuBar extends JComponent implements Accessible,MenuElement
  94 {
  95     /**
  96      * @see #getUIClassID
  97      * @see #readObject
  98      */
  99     private static final String uiClassID = "MenuBarUI";
 100 
 101     /*
 102      * Model for the selected subcontrol.
 103      */
 104     private transient SingleSelectionModel selectionModel;
 105 
 106     private boolean paintBorder           = true;
 107     private Insets     margin             = null;
 108 
 109     /* diagnostic aids -- should be false for production builds. */
 110     private static final boolean TRACE =   false; // trace creates and disposes




  71  * has been added to the <code>java.beans</code> package.
  72  * Please see {@link java.beans.XMLEncoder}.
  73  * <p>
  74  * <strong>Warning:</strong>
  75  * By default, pressing the Tab key does not transfer focus from a <code>
  76  * JMenuBar</code> which is added to a container together with other Swing
  77  * components, because the <code>focusTraversalKeysEnabled</code> property
  78  * of <code>JMenuBar</code> is set to <code>false</code>. To resolve this,
  79  * you should call the <code>JMenuBar.setFocusTraversalKeysEnabled(true)</code>
  80  * method.
  81  * @beaninfo
  82  *   attribute: isContainer true
  83  * description: A container for holding and displaying menus.
  84  *
  85  * @author Georges Saab
  86  * @author David Karlton
  87  * @author Arnaud Weber
  88  * @see JMenu
  89  * @see JPopupMenu
  90  * @see JMenuItem
  91  * @since 1.2
  92  */
  93 @SuppressWarnings("serial")
  94 public class JMenuBar extends JComponent implements Accessible,MenuElement
  95 {
  96     /**
  97      * @see #getUIClassID
  98      * @see #readObject
  99      */
 100     private static final String uiClassID = "MenuBarUI";
 101 
 102     /*
 103      * Model for the selected subcontrol.
 104      */
 105     private transient SingleSelectionModel selectionModel;
 106 
 107     private boolean paintBorder           = true;
 108     private Insets     margin             = null;
 109 
 110     /* diagnostic aids -- should be false for production builds. */
 111     private static final boolean TRACE =   false; // trace creates and disposes