Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mouselistner not working for a table object

 
Smriti Anchu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic