summaryrefslogtreecommitdiff
path: root/javax/swing/JMenuBar.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/JMenuBar.java')
-rw-r--r--javax/swing/JMenuBar.java33
1 files changed, 19 insertions, 14 deletions
diff --git a/javax/swing/JMenuBar.java b/javax/swing/JMenuBar.java
index 35f129377..73b409e42 100644
--- a/javax/swing/JMenuBar.java
+++ b/javax/swing/JMenuBar.java
@@ -298,19 +298,25 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
}
/**
- * DOCUMENT ME!
+ * This method is not implemented and will throw an {@link Error} if called.
*
- * @return DOCUMENT ME!
+ * @return This method never returns anything, it throws an exception.
*/
public JMenu getHelpMenu()
{
- return null;
+ // the following error matches the behaviour of the reference
+ // implementation...
+ throw new Error("getHelpMenu() is not implemented");
}
/**
- * Returns margin betweeen menu bar's border and its menues
+ * Returns the margin between the menu bar's border and its menus. If the
+ * margin is <code>null</code>, this method returns
+ * <code>new Insets(0, 0, 0, 0)</code>.
*
- * @return margin between menu bar's border and its menues
+ * @return The margin (never <code>null</code>).
+ *
+ * @see #setMargin(Insets)
*/
public Insets getMargin()
{
@@ -617,21 +623,20 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
}
/**
- * Sets the menu bar's "margin" bound property, which represents
- * distance between the menubar's border and its menus.
- * icon. When marging property is modified, PropertyChangeEvent will
- * be fired to menuBar's PropertyChangeListener's.
- *
- * @param m distance between the menubar's border and its menus.
+ * Sets the margin between the menu bar's border and its menus (this is a
+ * bound property with the name 'margin').
*
+ * @param m the margin (<code>null</code> permitted).
+ *
+ * @see #getMargin()
*/
public void setMargin(Insets m)
{
if (m != margin)
{
- Insets oldMargin = margin;
- margin = m;
- firePropertyChange("margin", oldMargin, margin);
+ Insets oldMargin = margin;
+ margin = m;
+ firePropertyChange("margin", oldMargin, margin);
}
}