• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multi Column JList

 
Tod Sterben
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to use JList to scroll data I will be loading to it from a database. I would like to have different cells in the list for the different fields I am bringing back so that I could put different listeners attached to each cell.
How can this be done?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ummm... make it a JTable instead of a JList?
 
Tod Sterben
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I make the cells wrap? Some of the fields will contain up to 255 characters.
 
Eddie Vanda
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a JTable hold JTextArea cells?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a link that provides more information.
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
see this article for multine column cells:
http://www.javaspecialists.co.za/archive/Issue045.html
and this article for using any jcomponent as cell renderer/editor:
http://www.codeguru.com/java/articles/162.shtml
cheers,
chantal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!