-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
rc1
-
generic, x86
-
generic, linux, windows_nt, windows_2000
-
Verified
Name: rmT116609 Date: 09/27/2001
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
I have a JFrame containing a JComboBox (north) and a JPanel (center). Clicking
on the JComboBox drops down the list of items, when I click on one of these
items the mouse click event is sent to the JPanel. (when the JComboBox drops
down it overlaps the JPanel). This doesn't seem to happen in an earlier beta
of 1.4 I have on another machine (sorry can't get -version at the moment).
Demo:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TestJComboBox extends JFrame
{
public static void main(String[] args)
{
TestJComboBox tjcb = new TestJComboBox();
}
public TestJComboBox()
{
JComboBox combo = new JComboBox();
JPanel panel = new JPanel();
combo.addItem("java");
combo.addItem("rocks");
panel.addMouseListener(new QuitMouseListener());
getContentPane().setLayout(new BorderLayout());
getContentPane().add(combo, BorderLayout.NORTH);
getContentPane().add(panel, BorderLayout.CENTER);
setSize(800, 600);
setVisible(true);
}
class QuitMouseListener extends MouseAdapter
{
public void mouseClicked(MouseEvent ev)
{
System.err.println("you clicked the panel!");
System.exit(0);
}
}
}
(Review ID: 132761)
======================================================================
- duplicates
-
JDK-4523910 REGRESSION: setCaretPosition in JTextComponents not working in 1.4beta's
- Closed
-
JDK-4516021 Clicking on close box of JInternalFrame doesn't consume the event
- Closed
-
JDK-4517826 MouseEvent ex-modifiers not delivered correctly to lightweight comps.
- Closed
- relates to
-
JDK-6427285 Mouse listener for JComponent doesn't get MOUSE_CLICKED event when popup is shown on MOUSE_RELEASED
- Open
-
JDK-4955581 [Win] Caret is positioned incorrectly while using Chinese QuanPin Input Method
- Closed