Results 1 to 3 of 3
Thread: JList with a scrollbar
- 01-19-2012, 02:09 AM #1
Member
- Join Date
- Nov 2011
- Posts
- 11
- Rep Power
- 0
JList with a scrollbar
i think this code should work, but it doesn't and i have no idea why
can someone help me?
Java Code:final JList listArea = new JList(listModel); GridBagConstraints gbc_listArea = new GridBagConstraints(); gbc_listArea.fill = GridBagConstraints.BOTH; gbc_listArea.insets = new Insets(0, 0, 5, 0); gbc_listArea.gridwidth = 4; gbc_listArea.gridx = 0; gbc_listArea.gridy = 1; JScrollPane scroll= new JScrollPane(listArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); panel.add(scroll, gbc_listArea); listArea.setCellRenderer(new CustomListRenderer()); listArea.setPreferredSize(new Dimension(20, 30));
-
Re: JList with a scrollbar
Please define "doesn't work"?
- 01-19-2012, 08:23 AM #3
Re: JList with a scrollbar
tom2zip, you have inconclusively abandoned every single thread you have started on this forum, and never expressed thanks to those who tried to help and advise you.
Not the best way to continue to get help, that.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Help with JList selection showing values on another JList
By SpO0KIe in forum AWT / SwingReplies: 4Last Post: 01-10-2012, 01:05 PM -
Link one JList to another JList
By mib1bee in forum New To JavaReplies: 1Last Post: 12-30-2010, 06:24 PM -
scrollbar not coming on jlist
By silversurfer2in in forum AWT / SwingReplies: 8Last Post: 06-22-2010, 11:07 AM -
ScrollBar in a JList
By lupo in forum AWT / SwingReplies: 2Last Post: 05-20-2010, 10:42 PM -
JList with ScrollBar
By Psyclone in forum AWT / SwingReplies: 5Last Post: 02-12-2010, 04:02 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks