posted 18 years ago
I have a jdbTable with a resultset displayed.
I'd like to select all fields (as CTRL C) and with CTRL V to past it in a excel sheet.
I tried with
public void jButton_actionPerformed(ActionEvent e) {
jdbTable2.selectAll();
e.setSource(jdbTable2); //table is a JTable
ActionListener copyAction2 = jdbTable2.getActionMap().get("copy");
copyAction2.actionPerformed(e);
}
but in this way I copy only one row ... but I want to select all the rows.
Is there any way to do it?
thanks.