File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Mouselistner not working for a table object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Mouselistner not working for a table object" Watch "Mouselistner not working for a table object" New topic
Author

Mouselistner not working for a table object

Smriti Anchu
Ranch Hand

Joined: Dec 21, 2004
Posts: 40
Hi all,

I have a JTable object called VTable present in the swing package. For this JTable, none of the listeners gets executed.

The above mouseListener doesnt get executed.

Or do we have to create a view only.

[ EJFH: Everyone thinks their post is urgent, yours no more so than others. ]
[ April 08, 2005: Message edited by: Ernest Friedman-Hill ]
Mohammed Ajmal
Greenhorn

Joined: Sep 20, 2004
Posts: 29
Hi,
You need to add Mouselistener to the table Header.

Try using the below code:

VTable m_table = new VTable(rowData,colNames,false); m_table.getTableHeader().addMouseListener(new java.awt.event.MouseListener(){ public void mouseClicked(MouseEvent e) { System.out.println("TEST!!!"); }

Thanks,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mouselistner not working for a table object