Results 1 to 2 of 2
Thread: JList with custom Array
- 10-09-2010, 07:13 PM #1Member
- Join Date
- Oct 2010
- Rep Power
JList with custom Array
I am having a problem at the minute with my JList it is currently reading the data in ok from the JBoss server using a bean which connects to a sybase database.
The issue I am having is that I wish to customize what the display text is when I set the Data of the jlist. I would really appreciate any help you can offer me as I need to complete this project by the end of today.
private void UpdateLists()
You might want to create a wrapper object that has a custom toString() method to hold each piece of data since default cell renderer used by JList uses toString to display the data. If this is not powerful enough, then you may need to create a custom cell renderer, and the JList tutorial can help you get started with this: JList Tutorial
Best of luck!
- By bugmenot in forum New To JavaReplies: 5Last Post: 04-15-2009, 01:10 AM
- By glhansen in forum New To JavaReplies: 3Last Post: 03-24-2009, 11:27 AM
- By pinks_70986 in forum New To JavaReplies: 1Last Post: 02-12-2009, 09:36 AM
- By hungleon88 in forum Advanced JavaReplies: 5Last Post: 08-30-2008, 10:24 PM
- By Albert in forum NetBeansReplies: 1Last Post: 07-13-2007, 04:42 PM