JCheckBox i en JTable
Er det mulig at placere en JCheckBox i alle celler i den 3. kolonne?
public class TableDisplay extends JFrame
{
private JTable table;
public TableDisplay()
{
setSize(400, 400);
table = new JTable(3,4);
JScrollPane scroller = new JScrollPane table );
getContentPane().add(scroller);
show();
}
public static void main( String args[] )
{
final TableDisplay app = new TableDisplay();
app.addWindowListener(new WindowAdapter()
{
public void windowClosing( WindowEvent e)
{
System.exit( 0 );
}
}
);
}
}