tags:

views:

29

answers:

0

Hello guys, i have a table with a column that contains Boolean type.

now when i try to run a program i have a problem:

System.out.println(table.getColumnClass(5));

b= (Boolean)table.getValueAt(row, 5);

It prints

class java.lang.Boolean

but also:

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean

and i even try with

b= (Boolean)table.getValueAt(row, 5);
b= Boolean.parseBoolean((String)table.getValueAt(row, 5));
b= table.getValueAt(row, 5);

but those show error too.

So how to fix this guys?