3 import java
.awt
.Component
;
5 import javax
.swing
.JTable
;
6 import javax
.swing
.table
.DefaultTableCellRenderer
;
8 public class IntTableCellRenderer
extends DefaultTableCellRenderer
14 private static final long serialVersionUID
= 1L;
18 //DecimalFormat dform = new DecimalFormat("####0.00");
19 public Component
getTableCellRendererComponent(final JTable table
, final
20 Object value
,boolean isSelected
,boolean hasFocus
,int row
,int column
){
21 super.getTableCellRendererComponent(table
, value
, isSelected
, hasFocus
,row
, column
);
22 setHorizontalAlignment(javax
.swing
.SwingConstants
. RIGHT
);
23 if(value
instanceof Integer
){
27 setText(Integer
.toString((Integer
)value
));
33 setText(value
.toString());