| Author |
JList
|
Rajeev Iyer
Ranch Hand
Joined: Jun 19, 2002
Posts: 42
|
|
Hi... How can I add Images(ImageIcons) to a JList?? Thanks....
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
You would make a new ListCellRenderer that displays Icons and call setCellRenderer() on the JList, passing in your new ListCellRenderer class. The easiest way to do this would be to extend DefaultListCellRenderer and override the getListCellRendererComponent method to something like this:
|
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
|
 |
 |
|
|
subject: JList
|
|
|