Java - AWT/Swing

JTable, set selection/marking

To set the selection/marking in a JTable, you must use the SelectionModel:


JTable table = new JTable(...
table.getSelectionModel().setSelectionInterval(1, 3);  // marks the lines 1-3

Eigene Werkzeuge
Werkzeuge

gratis Counter by GOWEB
seit 9.10.2007