• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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);
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic