• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable Rendering  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the custom renderer for the JTable. The custom editor will return the same custom renderer. Renderer contains the JList and JLabel in a JPanel. The renderer displays the data in the list. If no data then a blank list. But I am getting the problem. The problem is that the all cells in a column are getting the same value in renderer's JList, while in Editor's JList is the actual one. Why? Is there a solution?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't say what the problem here is without seeing the code. I'd suggest that you check out Sun's Java tutorial - there are examples of renderers in Further Customizing Table Display and Event Handling. Read through that first and see if you can figure out the problem. If you can't, then you can post some code here and maybe we can see the problem. If you do this, please try to remove everything from the code except what's needed to demonstrate the problem. The longer your code is, the less likely anyone will want to pore through it to figure out what it's doing.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!