|
Quick Lists
|
|
Bug ID:
|
4298592
|
|
Votes
|
39
|
|
Synopsis
|
JPopupMenus w/ cascaded menus can crash if outside parent frame
|
|
Category
|
java:classes_awt_im
|
|
Reported Against
|
1.3.1-pr3
, kestrel-rc1
, kestrel-rc3
, kestrel-beta
|
|
Release Fixed
|
|
|
State
|
11-Closed, duplicate of 4280243,
bug
|
|
Priority:
|
2-High
|
|
Related Bugs
|
4280243
|
|
Submit Date
|
10-DEC-1999
|
|
Description
|
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-I)
Java HotSpot(TM) Client VM (build 1.3-I, mixed mode)
NOTE: I don't know if this occurs on Unix because I only have the RA release
loaded on my NT box.
There's a bug in the popup handling code that can result in a null pointer
exception (traceback at the bottom). This seems to have cropped up in the 1.3
code because I can't reproduce the problem using 1.2.2fcs.
The scenario involves using a JPopupMenu menu that has a cascaded submenu and
trying to post the menu such that the cascade's JMenu item is positioned outside
of the window (JFrame in my case). The test app below can be used to reproduce
this but it may take several attempts at posting then unposting the popup to
get the exception to be thrown.
Here's the code you can use:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class PopupCrash extends JFrame {
public static void main(String[] args) {
PopupCrash window = new PopupCrash();
window.setTitle("Popup Menu Crash");
window.setBounds(300,300,300,50);
window.setVisible(true);
}
public PopupCrash() {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
Container contentPane = getContentPane();
JLabel l = new JLabel("I'm a JLabel with a popup menu");
l.addMouseListener(new PopupListener());
contentPane.add(l, BorderLayout.CENTER);
// Create the popup menu.
JPopupMenu popup = new JPopupMenu();
JMenuItem mi = new JMenuItem("A popup menu item");
popup.add(mi);
JMenu submenu = new JMenu("A cascaded menu");
mi = new JMenuItem("Item #1");
submenu.add(mi);
mi = new JMenuItem("Item #2");
submenu.add(mi);
mi = new JMenuItem("Item #3");
submenu.add(mi);
popup.add(submenu);
}
class PopupListener extends MouseAdapter {
public void mousePressed(MouseEvent e) {
maybeShowPopup(e);
}
public void mouseReleased(MouseEvent e) {
maybeShowPopup(e);
}
private void maybeShowPopup(MouseEvent e) {
if (e.isPopupTrigger()) {
popup.show(e.getComponent(),
e.getX(), e.getY());
}
}
}
}
Here's the exception traceback:
Exception occurred during event dispatching:
java.lang.NullPointerException: null pData
at sun.awt.windows.WInputMethod.handleNativeIMEEvent(Native Method)
at sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:256)
at sun.awt. customer .InputContext.dispatchEvent(InputContext.java:173)
at
sun.awt. customer .InputMethodContext.dispatchEvent(InputMethodContext.java:180)
at java.awt.Component.dispatchEventImpl(Component.java:2473)
at java.awt.Container.dispatchEventImpl(Container.java:1302)
at java.awt.Component.dispatchEvent(Component.java:2443)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2504)
at
java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:2372)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2261)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2191)
at java.awt.Container.dispatchEventImpl(Container.java:1289)
at java.awt.Window.dispatchEventImpl(Window.java:854)
at java.awt.Component.dispatchEvent(Component.java:2443)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:302)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:95)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:86)
(Review ID: 98707)
======================================================================
C:\TEMP>java -version
java version "1.3.0rc3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc3-Z)
Java HotSpot(TM) Client VM (build 1.3.0rc3-Z, mixed mode)
C:\TEMP>
This bug is consistent in my app, but I cannot send you that. Instead, I
have created a test case which exhibits the problem, but only
intermittently.
To recreate the problem, do this.
Physically place the included program on the top half of your screen and
the MS-DOS window on the bottom half.
Right click to get the pop up menu, but in a
way so that it overlaps the MS-DOS window (ie. right click close to the
bottom of the program's screen). Randomly select sub-menu items alternating
between the last item and any of the above items. Repeat until
the exception is thrown.
============================== Snip =====================================
import javax.swing.event.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Popup extends JFrame {
JPopupMenu popup = new JPopupMenu ();
public Popup() {
popup.setInvoker (this);
buildPopup();
addMouseListener (new MouseAdapter() {
public void mousePressed (MouseEvent e) {
if (e.isPopupTrigger()) {
popup.show (e.getComponent(),
e.getX(), e.getY());
}
}
public void mouseReleased (MouseEvent e) {
if (e.isPopupTrigger()) {
popup.show (e.getComponent(),
e.getX(), e.getY());
}
}
});
}
public void buildPopup() {
int cnt = popup.getSubElements().length;
for (int i = cnt - 1; i > 0; i--) {
popup.remove(i);
}
JMenuItem item;
for (int i = 0; i < 10; i ++) {
item = new JMenu("Menu" + i);
for (int j = 0; j < 10; j++) {
JMenuItem mi = new JMenuItem("menu" + i + " " + j);
item.add(mi);
}
popup.add(item);
}
// popup.addSeparator();
popup.add("Last");
}
public static void main(String args[]) {
JFrame frame = new Popup();
frame.pack();
frame.setVisible(true);
frame.setSize(300, 300);
}
}
============================== Snip ======================================
--
C:\TEMP>java Popup
Exception occurred during event dispatching:
java.lang.NullPointerException: null pData
at sun.awt.windows.WInputMethod.handleNativeIMEEvent(Native Method)
at sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:275)
at sun.awt. customer .InputContext.dispatchEvent(InputContext.java:202)
at sun.awt. customer .InputMethodContext.dispatchEvent(InputMethodContext.java:1
77)
at java.awt.Component.dispatchEventImpl(Component.java:2529)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
)
at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:231
8)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2189)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:10
3)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
(Review ID: 104063)
** Nov 5 2000 5:34PM Belley,Gaetan **
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
jdk Versions: jdk1.3.0, and pre released jdk1.3.0_01 [nov 1st, 2000]
Hardware Platform: customer
OS Version: Windows NT 4 (sp 6a), 95, 98, 2000
If a popup menu extends beyond the bounds of it's parent window,
then after a menu item has been selected next time the popup is attempted to be shown
it causes the above exception.
Worked fine in jdk1.2.x. From jdk-1.3 it has been broken.
Happens *EVERY* time a heavy weight popup menu is used when things extend
beyond the bounds of the parent window. It makes jdk-1.3 *VERY* broken for
applications.
To reproduce compile and run the app.
Select the Big menu by clicking, then mouse down to select Die.
Close the dialog which is popped up.
Select the Big menu by clicking and mouse down.
You will get the null pdata exception almost instantly.
NOTE: It seems much harder to cause this problem if you use keyboard navigation /
mnemomnics.
@@@@@@@@@@@@@@@@@ Test.java @@@@@@@@@@@@@@@@@@@@@@@@@
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class Test {
public static void main(String[] aArgs) {
if (aArgs.length > 0) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (java.lang.Exception aE) {
// ignore
}
}
JFrame lFrame = new JFrame("The problem");
lFrame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent aE) {
System.exit(0);
}
});
JMenuBar lMB = new JMenuBar();
JMenu lFile = createMenu("File", 'F');
lFile.add(createItem("Mumma", 'M'));
lFile.add(createItem("Mia", 'i'));
lMB.add(lFile);
JMenu lBig = createMenu("Big", 'B');
lBig.add(createItem("Little", 'L'));
lBig.add(createSubMenu("Miss", 'M'));
lBig.add(createItem("Muffet", 'U'));
lBig.add(createItem("Die", 'D'));
lMB.add(lBig);
JMenu lHelp = createMenu("Help", 'H');
lHelp.add(createItem("About", 'A'));
lMB.add(lHelp);
lFrame.setJMenuBar(lMB);
JPanel lData = new JPanel(new BorderLayout(5, 5));
lData.add(new JLabel("Bring up the \"Big\" menu using your mouse, then mouse down and select \"Die\", then bring up the \"Big\" menu and you'll get an exception if you try to mouse down to the \"Miss\" sub-menu"), BorderLayout.CENTER);
lData.add(new JLabel("Stuff"), BorderLayout.SOUTH);
lData.add(new JPanel(), BorderLayout.WEST);
lData.add(new JPanel(), BorderLayout.EAST);
lData.add(new JPanel(), BorderLayout.NORTH);
lFrame.getContentPane().add(lData);
lFrame.pack();
lFrame.show();
}
private static JMenu createMenu(String aName, char aMnemonic) {
JMenu lMenu = new JMenu(aName);
lMenu.setMnemonic(aMnemonic);
return lMenu;
}
private static JMenuItem createItem(String aName, char aMnemonic) {
JMenuItem lItem = new JMenuItem(aName);
lItem.setMnemonic(aMnemonic);
lItem.addActionListener(
new ActionListener() {
public void actionPerformed(final ActionEvent aE) {
System.err.println("Done " + aE.getSource());
SwingUtilities.invokeLater(
new Runnable() {
public void run() {
final JDialog lDialog = new JDialog(
(JFrame)SwingUtilities.getAncestorOfClass(
JFrame.class, (java.awt.Component)aE.getSource()),
"Fat Cat");
JPanel lPanel = new JPanel(new BorderLayout());
lPanel.add(new JLabel("Close Me Please"), BorderLayout.CENTER);
JButton lButt = new JButton("Now");
lButt.setMnemonic('N');
lButt.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent aE) {
SwingUtilities.invokeLater(
new Runnable() {
public void run() {
lDialog.setVisible(false);
lDialog.dispose();
}
}
);
}
}
);
lPanel.add(lButt, BorderLayout.SOUTH);
lDialog.getContentPane().add(lPanel);
lDialog.pack();
lDialog.show();
}
}
);
}
}
);
return lItem;
}
private static JMenuItem createSubMenu(String aName, char aMnemonic) {
JMenu lSub = new JMenu(aName);
lSub.setMnemonic(aMnemonic);
lSub.add(createItem("Flip", 'F'));
lSub.add(createItem("Me", 'M'));
lSub.add(createItem("Out of Here", 'H'));
return lSub;
}
}
@@@@@@@@@@@@@@@@@ Results on windows NT 4.0/SP6 [jdk1.3.0_01(nov1, 2000)] @@@@@@@@@@@@@@@@@@@@@@@@@
E:\gaetan\sdr\MySdrRequests\738344\CUSTCODE>java -fullversion
java full version "1.3.0_01"
E:\gaetan\sdr\MySdrRequests\738344\CUSTCODE>which java
/cygdrive/d/ADDON/jdk1.3.0_01-110100/bin/java
E:\gaetan\sdr\MySdrRequests\738344\CUSTCODE>java Test
Done
javax.swing.JMenuItem[,1,66,75x21,alignmentX=null,alignmentY=null,border=javax.swing.plaf.metal.MetalBorders$ xxxxx@xxxxx ,flag
=1056,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[to
=2,left=2,bottom=2,right=2],paintBorder=true,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,select
dIcon=,text=Die]
Exception occurred during event dispatching:
java.lang.NullPointerException: null pData
at sun.awt.windows.WInputMethod.handleNativeIMEEvent(Native
Method)
at
sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:275)
at sun.awt. customer .InputContext.dispatchEvent(InputContext.java:202)
at
sun.awt. customer .InputMethodContext.dispatchEvent(InputMethodContext.java:177)
at java.awt.Component.dispatchEventImpl(Component.java:2529)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:2318)
at
java.awt.LightweightDispatcher.eventDispatched(Container.java:2411)
at
java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:1486)
at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:1355)
at java.awt.Component.dispatchEventImpl(Component.java:2509)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightD
ispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:2205)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Exception occurred during event dispatching:
java.lang.NullPointerException: null pData
at sun.awt.windows.WInputMethod.handleNativeIMEEvent(Native
Method)
at
sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:275)
at sun.awt.im.InputContext.dispatchEvent(InputContext.java:202)
at
sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:177)
at java.awt.Component.dispatchEventImpl(Component.java:2529)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:2318)
at
java.awt.LightweightDispatcher.eventDispatched(Container.java:2411)
at
java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:1486)
at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:1355)
at java.awt.Component.dispatchEventImpl(Component.java:2509)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:2205)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Exception occurred during event dispatching:
java.lang.NullPointerException: null pData
at sun.awt.windows.WInputMethod.handleNativeIMEEvent(Native
Method)
at
sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:275)
at sun.awt.im.InputContext.dispatchEvent(InputContext.java:202)
at
sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:177)
at java.awt.Component.dispatchEventImpl(Component.java:2529)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:2318)
at
java.awt.LightweightDispatcher.eventDispatched(Container.java:2411)
at
java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:1486)
at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:1355)
at java.awt.Component.dispatchEventImpl(Component.java:2509)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:2205)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Exception occurred during event dispatching:
java.lang.NullPointerException: null pData
at sun.awt.windows.WInputMethod.handleNativeIMEEvent(Native
Method)
at
sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:275)
at sun.awt.im.InputContext.dispatchEvent(InputContext.java:202)
at
sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:177)
at java.awt.Component.dispatchEventImpl(Component.java:2529)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:2318)
at
java.awt.LightweightDispatcher.eventDispatched(Container.java:2411)
at
java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:1486)
at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:1355)
at java.awt.Component.dispatchEventImpl(Component.java:2509)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:2205)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Exception occurred during event dispatching:
java.lang.NullPointerException: null pData
at sun.awt.windows.WInputMethod.handleNativeIMEEvent(Native
Method)
at
sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:275)
at sun.awt.im.InputContext.dispatchEvent(InputContext.java:202)
at
sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:177)
at java.awt.Component.dispatchEventImpl(Component.java:2529)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:2318)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:2189)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
E:\gaetan\sdr\MySdrRequests\738344\CUSTCODE>
@@@@@@@@@@@@@@@@@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Posted Date : 2005-07-22 03:26:06.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
Probably a duplicate of 4280243. Can you please check whether your Ladybird fix takes care of this?
xxxxx@xxxxx 2000-11-08
Confirmed that the problem was not reproducible on our team workspace build, which means that this problem is a duplicate of 4280243.
xxxxx@xxxxx 2000-11-08
|
|
Comments
|
Submitted On 08-JAN-2000
grouch3
I have an identical bug, also running kestrel beta: I only get it for a pop-up
appearing in the right hand side of a JSplitPane, set at index 1 within a
JTabbedPane. I know there have been other problems with this combination. It
appears generally to throw the exception on alternate re-constructions (NOT
re-paints) of the pop-up.
Submitted On 03-FEB-2000
kuhse
This bug appears in 1.3.0RC1.
Submitted On 03-FEB-2000
kuhse
Related bug: 4281812?
Submitted On 29-FEB-2000
kpeck
Since we have a lot of small windows to show all our data
and those windows each have their own right button menu
v1.3.x is almost unusable to us because of this bug. We are
running Windows NT 1.3rc1.
Submitted On 17-MAR-2000
mbunks
I've got the same thing using normal menus (JMenuBar).
Although its tough to break using JMenuBar. I was thinking I was going to have to report this one and get a
"Closed -- Unreproducible" evaluation.
I didn't catch that it was only happening if it occured outside the JFrame area until I read this.
I resized my JFrame to be larger so the submenus wouldnt appear outside the JFrame and I couldnt get it to
break.
Although thats probably not a viable workaround using JPopupMenus.
Submitted On 03-MAY-2000
jvella
This bug still exists in 1.3rc3
Submitted On 09-MAY-2000
kuhse
...and in 1.3fcs too.
Submitted On 10-MAY-2000
kuhse
...because they didn't bother fixing this regression.
Submitted On 08-JUN-2000
agovil1
This bug also occurs with 1.3 release version. It appears
to be directly tied to bugs 4280243, 4329142.
There seems to be no way to properly display menus
exceeding the underlying frame.
Submitted On 01-JUL-2000
lbarowski
We are having the same problems, and with a normal
JMenuBar/JMenu/JMenu as "mbunks" noted above. This seems to
happen on all Windows versions. Here is a stack dump from
Win95, which is sligtly different from the one above:
> -- java.lang.NullPointerException: null pData
> -- at
sun.awt.windows.WInputMethod.handleNativeIMEEvent(Native
Method)
> -- at
sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:275)
> -- at
sun.awt.im.InputContext.dispatchEvent(InputContext.java:202)
> -- at
sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:177)
> -- at
java.awt.Component.dispatchEventImpl(Component.java:2529)
> -- at
java.awt.Container.dispatchEventImpl(Container.java:1212)
> -- at
java.awt.Component.dispatchEvent(Component.java:2499)
> -- at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2427)
> -- at
java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:2294)
> -- at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:2165)
> -- at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:2101)
> -- at
java.awt.Container.dispatchEventImpl(Container.java:1199)
> -- at java.awt.Window.dispatchEventImpl(Window.java:912)
> -- at
java.awt.Component.dispatchEvent(Component.java:2499)
> -- at
java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
> -- at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
> -- at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
> -- at
java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Submitted On 24-AUG-2000
multiplexor
Java v1.3
I've been experiencing this bug for a while... hell it even
exists in Forte for Java. On one of the menus, which has
another submenu, just click on the submenu to open it, then
goto another menu, come back and goto the submenu, it'll
never open. Instead it will disappear, since it causes a
null pointer exception. Course, we don't see that... but
i'm used to this bug right now... i'm seeing it everywhere.
I've tried many many workarounds, and have found non. Only
1 exists which provides a small fix you can say. And that's
to make the Frame larger then the popup menus, so they
never appear outside the frame. Although if you manage to
use the keyboard to navigate through, it might work, once
you get to the submenu, click and hold on one of the
submenus, go back to the parent menu and move up or down 1
item. then let go, this should reset the menus, allowing
you to work with the mouse again... some weird stuff...
anyways, if anyone was confused by that, lemme know i can
try and clear it up.
this is probably one os the easiest bugs to reproduce, and
yet still hasn't been fixed.
Again, no workaround that i've seen, only to make the frame
bigger than the popupmenus...
although anoher problem exists when you have the dropdown
menus come outside of the jframe, it becomes heavyweight,
while the other menus in a menubar stay lightweight,
assuming they fit within the frame. creates inconsistencies.
especislly when the menus sometimes go over other Jdialogs,
and sometimes they appear under... ugh, anyways...
Submitted On 19-SEP-2000
jpl2
I don't know if it is related, but if a JComboBox pops up
outside of the containing window, my window manager
(WindowMaker) under Linux crashes most of the time (though
not always). It works fine if the pulldown is entirely
enclosed in the JFrame.
-JPL
Submitted On 09-OCT-2000
ejbarton
I found this message in bug # 4280243's page.
It's the same bug as this one, and I was lucky enough to come across
this suggestion because it's a really nice workaround.
written by: yuk.ishida
Wed Aug 30 22:17:22 PDT 2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
this is a Workaround
//add this code
someJMenuItem.enableInputMethods(false);
Submitted On 03-NOV-2000
multiplexor
the enableInputMethods method works... but what's it
suppsoed to do?
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |