Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6384552

REGRESSION: unknown window is created when the height of menu list is longer tha

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      b71
    • Introduced In Version:
      6
    • Resolved In Build:
      b77
    • CPU:
      generic, x86
    • OS:
      generic, windows, windows_2000, windows_xp

      Description

      A DESCRIPTION OF THE REGRESSION :
      Windows XP Professional SP1+
      JDK VERSION:mustang b71(not on this entry form,please append it)

      click the menubar , when the total height of menu items is longer than the window itself, an unknown window is created and displayed on the window's Taskbar.

      REPRODUCIBLE TESTCASE OR STEPS TO REPRODUCE:
      package testbug;

      import java.awt.Dimension;

      import javax.swing.*;

      public class TestJMenubar extends JFrame {
          private JMenuBar menuBar = new JMenuBar();

          private JMenu menuFile = new JMenu();

          private JMenuItem menuFileExit = new JMenuItem();

          private JMenuItem jMenuItem1 = new JMenuItem();

          private JMenuItem jMenuItem2 = new JMenuItem();

          public TestJMenubar() {
              try {
                  jbInit();
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }

          private void jbInit() throws Exception {
              this.setJMenuBar( menuBar );
              this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              this.getContentPane().setLayout( null );
              this.setSize( new Dimension(400, 50) );
              this.setTitle( "Menu" );
              menuBar.setAutoscrolls(true);
              menuFile.setText( "File" );
              menuFileExit.setText("Item");
              jMenuItem1.setText("long 1");
              jMenuItem2.setText("long 2");
              menuFile.add( menuFileExit );
              menuFile.add(jMenuItem1);
              menuFile.add(jMenuItem2);
              menuBar.add(menuFile);
          }

          public static void main(String[] argv){
                  TestJMenubar bar = new TestJMenubar();
                  bar.setVisible(true);
          }

      }


      RELEASE LAST WORKED:
      5.0 Update 6

      RELEASE TEST FAILS:
      mustang-b70

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      no extra window please.. at least prevent it from being displayed on taskbar.
      ACTUAL -
      it seems a new window is created and displayed on taskbar without any caption...

      Release Regression From : 5.0u6
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ant Anton Tarasov
              Reporter:
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: