Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Select all table's fields --- CTRL C!!??

 
Franco Lucci
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Franco Lucci
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I resoled ... it's a problem of jbuilderX ....
in jbuilderx the multiple row selection is in this way:
jdbTable2.getSelectionModel().setSelectionMode (ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Franco,
Glad to hear you resolved the problem. I'm moving this to IDE's for future readers of this thread.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic