I've got a
ComboBox within a JavaFX
Stage through FXML. Normally this works as expected. However, once I make the stage unresizable through
stage.setResizable(false);, the options of the
ComboBox receive a slight margin as seen below:
ComboBox has no custom styles and even when using a
Stage containing only the
ComboBox, the resizable option causes this effect. Is there any way to prevent this from happening and keeping the options aligned with the
ComboBox at all times?
Try running your code on Java 8 (latest current release version) and seeing if the issue is fixed for you.
See related question: JavaFX: Why does stage.setResizable(false) cause additional margins?
And bug report: RT-36413: Initial stage size set incorrectly for non-resizable stages.
I don't know of a clean workaround for your case.
Your bug likely has the same route cause as RT-36413, but exhibits somewhat behaviour, I suggest filing another bug report at https://javafx-jira.kenai.com (make sure you mention the existing RT-36413 bug in your new bug report).