Skip to main content

SwingComboBox mouse event problems

1 reply [Last post]
Joined: 2009-01-03

Hello. I have this situation. My stage is not very tall and the scene has a javafx.ext.swing.SwingComboBox (from now on just combobox) on the upper part and some CustomNodes on the lower part that react to mouse events. When I click on the combobox to show its list of elements, the list gets over que nodes on the lower part. All normal until this part. The problem is that the nodes that are now hidden behind the list are still listening to mouse events so if I click on an item of the combobox that is on the same place of a node I can accidentally also click the node behind it without even seeing it.

I tried setting the blocksMouse property to true on the combobox but it doesnt seem to affect the list of the combobox.

Another possibility is to set to null the mouse event functions of the nodes when the list of items is expanded but this is really an ugly way of dealing with this problem.

Another ugly possibility I thought of was trying to make the list of the combobox less taller so it doesnt reach the nodes on the lower part but I didnt find a way to do it.

I hope you you can help me with this matter. Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2007-11-15

This sounds like a bug to me. Can you please file an issue:

You need to create an account there first.