Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable Rendering Problem

 
fahad siddiqui
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have rendered a Panel inside the cells of a JTable using a customCellRenderer class of my own.

My Panel contains some textfield, radio buttons etc.
When i click on the panel for editing these textfields or something else,
it displays me a string detail of Jpanel:
javax.swing.JPanel[,-329,-54,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]

Also, this JTable keeps on getting updated with newer rows at runtime.

How do i make my JPanel behave normally, so that i can edit my textfields etc..

Please help asap.
Extremely important.
Thanks a lot in advance.
 
Akhshay Ray
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to supply a custom editor and use the same panel.
 
fahad siddiqui
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you provide some example code?
Also, what do you mean by use the same panel?
Please elaborate
 
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!