aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Select all table's fields --- CTRL C!!?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Select all table Watch "Select all table New topic
Author

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

Franco Lucci
Greenhorn

Joined: May 07, 2005
Posts: 6
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

Joined: May 07, 2005
Posts: 6
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

Joined: May 26, 2003
Posts: 30771
    
156

Franco,
Glad to hear you resolved the problem. I'm moving this to IDE's for future readers of this thread.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Select all table's fields --- CTRL C!!??