RegisterSearchFAQ UsergroupsLog in
Select the content of the cell

 
Reply to topic    Citra Technologies Forum Index » Technical Support - Evaluation View previous topic
View next topic

Select the content of the cell
Author Message
seetha



Joined: 13 Mar 2015
Posts: 14

Post Select the content of the cell Reply with quote
Dear team,

Please assist, In single click,How to select whole content of the selected cell instead of placing the cursor at the end of the field.I need it urgently.Thanks in advance.
Mon Apr 25, 2016 4:31 am View user's profile Send private message
seetha



Joined: 13 Mar 2015
Posts: 14

Post Reply with quote
Hi,

I'm currently having like the below image
[img]http://s32.postimg.org/so8yqvtht/Org.jpg?noCache=1461914290[/img]

but i need actually like the below image,please assist.
[img]http://s32.postimg.org/9hsjw32fl/Need.jpg?noCache=1461914424[/img]
Fri Apr 29, 2016 2:29 am View user's profile Send private message
support



Joined: 21 Feb 2006
Posts: 1443

Post Reply with quote
While editing you mean?

I think you can use the code below:

Code:
return new AdvancedJTable() {
   public boolean editCellAt(int row, int column, EventObject e) {
      boolean edit = super.editCellAt(row, column, e);
      if (edit) {
         final Component c = getEditorComponent();
         SwingUtilities.invokeLater(new Runnable() {
            public void run() {
               JTextField f = (JTextField) c;
               f.selectAll();
            }
         });
      }
      return edit;
   }
};

Fri Apr 29, 2016 4:44 am View user's profile Send private message
seetha



Joined: 13 Mar 2015
Posts: 14

Post Reply with quote
Hi ,
It works ...thanks.. Smile
Mon May 16, 2016 10:47 pm View user's profile Send private message
Display posts from previous:    

Reply to topic    Citra Technologies Forum Index » Technical Support - Evaluation All times are GMT - 5 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group