• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1211
  • Last Modified:

JTabbedPane with mouse listener

I've got a mouse listener on a JTabbedPane the captures the mouse click on a tab, calling my method tabClicked(). How do I determine which tab has been clicked?

private void tabClicked(MouseEvent event) {
    	
System.out.println ("TabbedPane.tabClicked" + event.getButton() + " " + event.getID() + " " + event.getSource().toString());
        
}

Open in new window

0
allelopath
Asked:
allelopath
  • 2
1 Solution
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now