Resize the JList.

How can I resize a JList which is inside a JScrollPane which is inside a JPane which has a JComboBox, JTextField and JButton inside of it, all of them put as BorderLayout.NORTH?I'd like my JList to fit all the space that is left after placing the other GUI components.
[283 byte] By [coffee95a] at [2007-11-27 9:57:14]
# 1

The CENTER is designed to give all available space to the Component there.

Maybe you try to rearrange the layout by placing the JScrollPane

with JList at BorderLayout.CENTER

You can also place a JPanel with BorderLayout at NORTH and place the JScrollPane +JList there in CENTER

Or combine JPanels with appropriate LayoutManagers in any suitable way

Message was edited by:

Andre_Uhres

Andre_Uhresa at 2007-7-13 0:27:30 > top of Java-index,Desktop,Core GUI APIs...