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

JWindow can not appear on Motif AWT

    Details

    • Subcomponent:
    • CPU:
      other, x86
    • OS:
      linux, solaris_2.5.1

      Description

      OPERATING SYSTEM(S)
      Redhat Enterprise Linux AS version 4(RHEL4), and
      RHEL3 Update4, SLES9 SP1.
      FULL JDK VERSION(S):
      java version "1.5.0_04"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
      DESCRIPTION:
      Steps to Recreate:
      1. Compile the following sample code.
        $ javac PopupWindowTest.java
      ========= PopupWindowTest.java =============
      import java.awt.Point;
      import java.awt.event.*;
      import javax.swing.*;
      public class PopupWindowTest extends JFrame {
      public static void main(String[] args) {
      PopupWindowTest test = new PopupWindowTest();
      test.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
      System.exit(0);
      }
      });
      test.setVisible(true);
      }
      public PopupWindowTest() {
      final JWindow popup;
      popup = new JWindow();
      popup.setContentPane(new JLabel("Popup JWindow"));
      JLabel l = new JLabel("Click Here");
      l.addMouseListener(new MouseAdapter() {
      public void mousePressed(MouseEvent e) {
      Point p = e.getComponent().getLocationOnScreen();
      popup.pack();
      popup.setLocation(p.x + e.getX(), p.y+e.getY());
      popup.setVisible(true);
      }
      public void mouseReleased(MouseEvent e) {
      popup.setVisible(false);
      }
      });
      getContentPane().add(l);
      setSize(100, 100);
      }
      }
      ============================================
      2. Run PopupWindowTest on Motif AWT.
        $ AWT_TOOLKIT=MToolkit java PopupWindowTest
        Then PopupWindowTest comes up.
      3. Click the window.
         However no popup window appears. <--- PROBLEM!!
         When the window is clicked, a task bar which seems to be for the popup menu appears in task bar area of the screen.
         Therefore it seems that java tries to open the popup window, but fails.
      Result
      JWindow can not appear on Motif AWT.
      Expected Result
      JWindow should appear on Motif AWT.
      Additional Information:
      - This problem does not occur on XAWT.
      - This problem does not occur with Java142 (1.4.2_07-b05).

        Attachments

          Activity

            People

            • Assignee:
              serb Sergey Bylokhov
              Reporter:
              elarsen Erik Larsen (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: