• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Event on a Table row- ( S W T ).

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there young ranchers .....
I have a nice working GUI with a few Tables on it, and now I was asked to add the option of a window opening( and doing something) when the user double clickes on a (any) row in the table.
now, does any body know the addSelectionListener method well enough to explain to me how to use it correctly .
Thanks a lot !.
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do I understand from your post title that you are using SWT? Or are you interested in help with a Swing JTable? I've done what you're interested in via a Swing JTable, but I can't help out with SWT...
 
Dave Jones
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I am using SWT and the question is addressed to SWT
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
// _tbv is the table.
_tbv.addDoubleClickListener(new IDoubleClickListener(){
public void doubleClick(DoubleClickEvent event){
IStructuredSelection selection =
(IStructuredSelection) event.getSelection();
}
});


Hope this helps.
 
We find this kind of rampant individuality very disturbing. But not this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!