The first time I encountered this I really did not pay much attention but after experiencing it the second time in my other ComboBox, I decided to look into it.

The issue happens when I click on the ComboBox the first time and the popup menu list that is shown has its width very short. The second time I click on the ComboBox and the list is shown again, the width is now correct as the width of the list now aligns itself with the ListView.

combobox_popup_width_small

Seems this is a bug in Java FX 2. User shakir.gusaroff in the Oracle forumprovided an insightful answer regarding this issue.

There is a bug: https://javafx-jira.kenai.com/browse/RT-28876 where the ComboBox popup list is set with the wrong width the first time it is shown if it is wider than prefWidth.

This is fixed in Java FX 8.0 already, but not in Java FX 2.

Related Posts Plugin for WordPress, Blogger...