Editable JTable Tutorial

前端 未结 6 972
名媛妹妹
名媛妹妹 2021-01-31 06:09

Are there any good books or website that go over creating a JTable? I want to make one column editable. I would like to actually put a inherited JCheckBox

6条回答
  •  别跟我提以往
    2021-01-31 07:02

    Some useful classes are:

    Package javax.swing.table :

    TableModel - Interface for a tablemodel AbstractTableModel - Nice class to extend for creating your own table with custom data structures DefaultTableModel - Default table model which can deal with arrays[] and Vectors

    To disable editing on any cell you need to override the isCellEditable(int row, int col) method

提交回复
热议问题