• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable with extended component  RSS feed

 
jack nick
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!