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

After minimizing all JInternalFrames the Menu can't be activated by F10

    XMLWordPrintable

    Details

      Description



      Name: rmT116609 Date: 05/15/2003


      FULL PRODUCT VERSION :
      java version "1.4.2-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
      Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)

      FULL OS VERSION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      After minimizing all the JInternalFrames on a JDesktopPane and the component focused on the last minimized JInternalFrame was a JTextFiled or JTextArea, i was unable to activate the JMenuBar (or MenuBar) by pressing the F10 button.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Start application with MenuBar, JDesktopPane and JInternalFrames
      2. Minimize all JInternalFrams but one.
      3. Make sure the one remaining JInternalFrame contain a JTextField or JTextArea and the JTextField or JTextArea has focus.
      4. Minimize the last JInternalFrame.
      5. Press F10 to activate the menu - IT WON'T WORK.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Pressing F10 should activate the menu.
      ACTUAL -
      Pressing F10 will not activate the menu.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.Menu;
      import java.awt.MenuBar;
      import java.awt.MenuItem;

      import javax.swing.JButton;
      import javax.swing.JDesktopPane;
      import javax.swing.JFrame;
      import javax.swing.JInternalFrame;
      import javax.swing.JLayeredPane;
      import javax.swing.JPanel;
      import javax.swing.JTextField;
      import javax.swing.WindowConstants;

      public class TestFrame extends JFrame {
      MenuBar bar = new MenuBar();
      Menu menu = new Menu("Test menu");
      Menu menu2 = new Menu("Test menu2");

      MenuItem menuItem = new MenuItem("Test menu item");
      MenuItem menuItem2 = new MenuItem("Test menu item2");

      JDesktopPane desktop = new JDesktopPane();

      public TestFrame() {

      setTitle("Testing");
      setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

      setSize(600, 600);

      menu.add(menuItem);
      menu2.add(menuItem2);
      bar.add(menu);
      bar.add(menu2);
      setMenuBar(bar);

      JPanel pe = new JPanel();
      pe.add(new JTextField("Testing"));
      pe.add(new JButton("Blah"));

      getContentPane().add(desktop);

      JInternalFrame iFrame1 = new JInternalFrame("TestInternalFrame", true, true, true, true);

      iFrame1.setSize(200, 100);
      iFrame1.getContentPane().add(pe);

      desktop.add(iFrame1, JLayeredPane.DEFAULT_LAYER);

      try {
      iFrame1.show();
      } catch (Exception e) {
      e.printStackTrace();
      }

      show();
      }

      public static void main(String[] args) {
      new TestFrame();
      }
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Non found yet. (Activating the menu by mouseclick works but that's not an option for me)
      (Review ID: 185846)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joutwatesunw Joshua Outwater (Inactive)
              Reporter:
              rmandalasunw Ranjith Mandala (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: