How to make the "dropdown" (or "popup", I don't know how it's called) of a JComboBox taller on the screen?
By default, when I open my JComboBox I see, say, 7 out of 29 items, then I need to scroll.
What should I do so that I can see, say, 15 out of these 32 items? (or if the dropdown is, say, 150 pixels tall, how can I make it 300 pixels tall?)
I've read the Sun tutorial on JComboBox and the JavaDoc but I must have overlooked the method(s) to call.
You are looking for the setMaximumRowCount method.
The JComboBox tutorial has some example code showing it in action.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With