• 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
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JTable with extended component

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Am working with a JTable having a component DateField which extends JTextField. This component makes up the elements in row 2. This component is meant to be editable. The problem I face is that I am able to get the functionality of this component only if I double click on the cell. A single click treats the component like it were a JTextField.
So this enables me to perform my functionality if the cell is clicked twice. Need it to be clicked just once.
Thanks
Jack
 
jack nick
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there,
Have got the soln for the problem. Thanks for the read anyway. For those interested we have to
getEditorComponent().requestFocus ();
All that it takes in the the listselectionlistener
Thanks anyways
Jack
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!