Hi Paul
I have populated my JTable in a JInternalFrame.
Now can u help me with writing a listener which would help the user to view the details of a single row.
When a user double-clicks a single row in a JTable,he/she should be able to see the details of that single row.
This code is not working properly.
>>>>>>>>>>>>>>>>>>>Sample Code>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.
I have added a MouseListener interface to my class.
jtable.addMouseListener(this);
public void mouseClicked(MouseEvent e)
{
if (e.getClickCount() == 2)
{
int index = jtable.getSelectedRow();
CommentsDialog comp=new CommentsDialog
(Issue_Tracking_t,index);
}
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>End of Sample Code>>>>>>>>>>>>>>>>
Here the CommentsDialog is a Dialog Class with the parameters Issue_Tracking_t,which is catching the object populating the Jtable.The index is the selcted row of the populated Jtable.
Why is the double click of the mouse not working.
Looking to hear from you.Tell me whether I am right in choosing the Listener.
Thanking you.
Sincere REgards
R.RItesh
Originally posted by Paul Stevens:
You need to be more specific on what you are needing.