< prev index next >


Print this page
rev 47462 : Fixed JDK-8178430: JMenu in GridBagLayout flickers when label text shows "..."
and is updated.
JDK-8178430: Fixed following issues with the test:
1. Throw exception in case the menu bar size is not proper.
2. Run the test for about 10 seconds, and then automatically
close the window.
3. Moved the fix from BasicMenuItemUI.java to BasicMenuUI.java
as per Sergey's suggestion.
4. Fixed the test case to correct the access to UI elements in EDT. Also, now made
sure that the main thread won't exit until the test is complete.
5.Removed unnecessary space in BasicMenuItemUI.java
6. Removed unnecessary import.
7. Moved the declaration of member variables into the constructor scope.

@@ -224,10 +224,15 @@
     protected MenuKeyListener createMenuKeyListener(JComponent c) {
         return (MenuKeyListener)getHandler();
+    public Dimension getMinimumSize(JComponent c) {
+        return (((JMenu)menuItem).isTopLevelMenu() == true) ?
+            c.getPreferredSize() : null;
+    }
     public Dimension getMaximumSize(JComponent c) {
         if (((JMenu)menuItem).isTopLevelMenu() == true) {
             Dimension d = c.getPreferredSize();
             return new Dimension(d.width, Short.MAX_VALUE);
< prev index next >