Results 1 to 4 of 4
  1. #1
    selva.bics is offline Member
    Join Date
    Aug 2009
    Posts
    11
    Rep Power
    0

    Default Double click eevent on particular row

    i have stored records in jtable, Now i want to call the function by double clicking

    on particular row and i want to take particular row's records in the function

    plz help soon

    with regards
    selva

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    1) Use a MouseListener
    2) use the columnAtPoint() and rowAtPoint() methods from JTable
    3) do your custom processing

  3. #3
    Join Date
    Sep 2009
    Posts
    2
    Rep Power
    0

    Default

    Hi,

    Take a look:

    Java Code:
    table.addMouseListener
    (
    	new MouseAdapter()
    	{
    		public void mouseClicked(MouseEvent e)	{					
    			
    			if (e.getClickCount() == 2 && tabela.getSelectedRow() == 3) {
    				
    				// Make your code.
    			}
    		}
    	}
    );

  4. #4
    selva.bics is offline Member
    Join Date
    Aug 2009
    Posts
    11
    Rep Power
    0

Similar Threads

  1. Executing a jar double-click style in Linux
    By goodwillwins in forum AWT / Swing
    Replies: 24
    Last Post: 03-19-2011, 04:56 AM
  2. run java application from desktop with double click
    By Rose88 in forum Advanced Java
    Replies: 4
    Last Post: 09-29-2009, 06:32 PM
  3. Run Jar file on double click
    By dhaval.rajput.p in forum New To Java
    Replies: 2
    Last Post: 07-24-2009, 05:44 PM
  4. How to detect double click with a JFrame
    By Jary316 in forum New To Java
    Replies: 3
    Last Post: 01-05-2009, 08:39 PM
  5. Double click radio button
    By mandragora in forum AWT / Swing
    Replies: 11
    Last Post: 11-10-2008, 11:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •