craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > General QuickTable Support/Help Post New Topic   Post A Reply
Double click in QuickTable printer friendly version
next newest post | next oldest post
Author Messages
dreal2004
Private

Gender: Male
Location: México, D.F.
Registered: May 2004
Status: Offline
Posts: 8

Click here to see the profile for dreal2004 Send email to dreal2004 Send private message to dreal2004 Find more posts by dreal2004 Edit or delete this message Reply w/Quote
Posted Wednesday, May 19, 2004 @ 15:03:46  

I have a JTable with 5 records and I want to select a record with a "double click option" and once selected the record to do some instructions.
¿How can I do that?.

¿How can I select a record from a JTable using a double click option?.
:?

--------------------

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Wednesday, May 19, 2004 @ 22:10:21  

JTable jt = quickTable.getTable();
jt.addMouseListener(new MouseAdapter(){
public void mouseReleased(MouseEvent e)
{
if (e.getClickCount() = 2 )
{
int selectedRow = jt.getSelectedRow();

//for example,to get data of selected row
for(int i= 0; i< jt.getColumnCount(); i++)
{
Object columnData = jt.getValueAt(selectedRow, i);
}
//going through the above loop you will get the data for each column in the row
//You can assign this data into your
}
}
});

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios