Java - AWT/Swing

JComboBox, layout

The layout with a JComboBox can be a bit complicated under circumstances.
The PreferredSize of a JComboBox is by long text entries the width of the longest entry.
This quality can lead into the destruction of the whole layout.
A simple remedy is the setting of PreferredSize:

JBomboBox cb = new JComboBox();
cb.setPreferredSize(60, cb.getPreferredSize().height);

Eigene Werkzeuge
Werkzeuge

gratis Counter by GOWEB
seit 9.10.2007