I have a JComboBox with 10 items- When I click on it, the shown popupmenu is not high enough to display all items and shows a vertical scrollbar:
I wan't the popupmenu to be as high as the content. Is it possible to change the maximum height of that popup menu?
You should try
yourComboBox.setMaximumRowCount(yourNumber);
Here's the javadoc link : https://docs.oracle.com/javase/7/docs/api/javax/swing/JComboBox.html#setMaximumRowCount(int)