Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with JTable  RSS feed

 
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!