Today, I met a depressing thing:
A jlist element is placed on a jframe, and this jlist element adds a mouse event:
mousereleased, mousepressed ...
Among them, in mousereleased, a pop-up menu is displayed primarily. In mousepressed, enter whether the user presses the left or right button.
But I found a strange thing,
When I set the current interface to:
Uimanager.setlookandfeel ("Com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
The mousepressed event cannot be triggered when the popup menu is displayed, followed by the right button.
It is not possible to change to a few other styles, only set as default:
Uimanager.setlookandfeel ("Javax.swing.plaf.basic.BasicLookAndFeel");
Only then, when the pop-up menu is displayed, and then right-click, the Mousepressed event can also be triggered.
Is this a bug? This is all the time, there is no such a low-level bug it?
Recall that year when the use of jdk1.3, JTextArea always unable to set the text at the same time as the coarse italic, then always find out where the problem, later only to know that the original is a bug, Dizzy dead.
This time, I do not know what caused the cause.
2009-10-23
Java: In different interface styles JPopupMenu and mouse events mousepressed performance results are different!