File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Showing multiple column on JList or JCombo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Showing multiple column on JList or JCombo" Watch "Showing multiple column on JList or JCombo" New topic

Showing multiple column on JList or JCombo

Pravin Girase

Joined: Oct 06, 2006
Posts: 1

I am trying build a GUI which requires JList or JCombo. The requirement is that the user needs to select some code from the list. But as the codes does not make sense so I want the user to show the multiple columns explaining what each code means and then user will make a selection after reading the description of the code.

I tried this with custom renderer for JCombo. I tried extending JPanel and implementing ListCellRenderer but I am not able to see the proper list. The list is cluttered.

Is this a good idea to use custom renderer or is there any better way of doing this.

Thanks in advance.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
perhaps setting a ToolTip for each item might be an alternative
It is sorta covered in the JavaRanch Style Guide.
subject: Showing multiple column on JList or JCombo
Similar Threads
JCOMBO Box traversal problem
JCombo Box Problem
JCombo Box And JTable
JCombo and its listeners
Placing Jcombo at specific coordinates