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

menu item hidden behind applet warning message

XMLWordPrintable

    • beta2
    • generic, x86
    • generic, windows_nt



      Name: gsC80088 Date: 03/23/99


      If the last menu item of a dropdown menu just happen to overlap the YELLOW applet window warning message, it will go behind it.

      Example code and HTML follows:

      import com.sun.java.swing.*;

      public class clippedMenu extends JApplet {

      public void init() {
      JFrame f = new JFrame("Clipped menu");

      JMenuBar menuBar = new JMenuBar();
      JMenu menu = new JMenu("Menu 1");

      JMenuItem item1 = new JMenuItem("Item 1");
      menu.add(item1);
      JMenuItem item2 = new JMenuItem("Item 2");
      menu.add(item2);
      JMenuItem item3 = new JMenuItem("Item 3");
      menu.add(item3);

      menuBar.add(menu);

      f.setJMenuBar(menuBar);

      f.pack();
      f.setSize(200,110);
      f.setVisible(true);
      }

      public static void main(String argc[]){
      clippedMenu cm = new clippedMenu();
      cm.init();
      }
      }


      <html>
      <head>
      <title>clipped menu</title>
      </head>

      <body>

      <!--"CONVERTED_APPLET"-->
      <!-- CONVERTER VERSION 1.0 -->
      <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
      WIDTH = 50 HEIGHT = 50 codebase="http://java.sun.com/products/plugin/1.1/jinstall-11-win32.cab#Version=1,1,0,0">
      <PARAM NAME = CODE VALUE = "clippedMenu.class" >
      <PARAM NAME = CODEBASE VALUE = "." >

      <PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">
      <COMMENT>
      <EMBED type="application/x-java-applet;version=1.1" java_CODE = "clippedMenu.class" java_CODEBASE = "." WIDTH = 50 HEIGHT = 50 pluginspage="http://java.sun.com/products/plugin/1.1/plugin-install.html"><NOEMBED></COMMENT>

      </NOEMBED></EMBED>
      </OBJECT>

      <!--
      <APPLET CODE = "clippedMenu.class" CODEBASE = "." WIDTH = 50 HEIGHT = 50 >


      </APPLET>
      -->
      <!--"END_CONVERTED_APPLET"-->

      </body>
      </html>


      In this example, "Item 3" will be hidden. Resizing the window up or down will solve the problem.
      (Review ID: 55958)
      ======================================================================

            peterz Peter Zhelezniakov
            gstone Greg Stone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: