This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with JTable

 
Maged Roshdy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am not much into JTable yet.I am just trying to put JProgressBar on a custom column and i want to see a simple code that explain how to do that.
Please advice.
Thanks
Maged
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to write your own TableCellRenderer:
class ProgressCellRenderer extends JProgressBar implements TableCellRenderer
you have to set this renderer explicitely. See the swing tutorial on renderers for how to do this.
see the source of DefaultTableCellRenderer to find out what methods to overwrite for better performance!
chantal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!