File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes format double precision in Jtable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "format double precision in Jtable" Watch "format double precision in Jtable" New topic
Author

format double precision in Jtable

orey sattiga
Greenhorn

Joined: Aug 27, 2002
Posts: 9
Hi ,
I need to format a column in a Jtable based on the some conditions. The column currently displays
double values without precision.
1) i need to display the double value only upto two decimal places.
2) I need to change the color of the text based one a condition.
My question is can i do both in the same cell renderer.. if so how??
Thanks
John Lee
Ranch Hand

Joined: Aug 05, 2001
Posts: 2545
I have some experience with JTable before, I think you may have to change number to string first to do this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: format double precision in Jtable