hello guys
i am using developing swing appication
and inserting radiobutton in jTABLE
BUT instead of that i am getting its true/false value...
pleasse give me solution...if any
my code is...
/**
*
*/
package appointmentFinal;
import java.awt.FlowLayout;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
public class Jtable1 extends JFrame
{
JTable t;
Jtable1()
{
String col[]={"Employee","Start_Date","Client","Product or Services","tax","cost"};
JCheckBox ch=new JCheckBox();
Object [][] data = {
{"Kathy", "Smith",
"Snowboarding", new Integer(5), ch,1},
{"John", "Doe",
"Rowing", new Integer(3), new Boolean(true),1},
{"Sue", "Black",
"Knitting", new Integer(2), new Boolean(false),1},
{"Jane", "White",
"Speed reading", new Integer(20), new Boolean(true),1},
{"Joe", "Brown",
"Pool", new Integer(10), new Boolean(false),1}
};
DefaultTableModel tb =new DefaultTableModel(data,col);
t=new JTable( tb);
for(int i=0;i<6;i++)
{
t.getColumnModel().getColumn(i).setPreferredWidth(150);
t.setRowHeight(30);
}
add(t);
setLayout(new FlowLayout());
setSize(700, 500);
setLocation(300, 150);
setTitle("Ticket_Information");
setVisible(true);
}
public static void main (String []args)
{
new Jtable1();
}
}