I have a few JComboBox instances in a GUI I've made. They all start off empty and get populated by the user, but because they start empty they look rubbish on the screen. I can't for the life of me find a way to set a default string to appear in an otherwise empty combo box. I just want to put in "-----" or something to set an initial size.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32689
4
posted
0
Have you tried setting them invisible (setVisible(false)) before they are populated??? Or maybe setPopupVisible()?
John Brookes
Greenhorn
Joined: Feb 26, 2004
Posts: 29
posted
0
Ah good call. I'll give it a go but I'd rather have them in place with a default string to keep the layout more consistent.