How to detect double click on a JTabbedPane

130 views
Skip to first unread message

scotru

unread,
Jul 8, 2012, 3:19:43 PM7/8/12
to aswing-...@googlegroups.com
Is there a way I can detect a double-click event on a JTabbedPane?
Here's what I'm trying:

_tabs.addStateListener(handleTabClick);
_tabs.addEventListener(MouseEvent.DOUBLE_CLICK,handleTabDoubleClick);

The single click handler works--but the double click handler does not.  Here's the handler:

public function handleTabDoubleClick(e : MouseEvent)
{
var pageName : String;
pageName = _tabs.getTitleAt(_tabs.getSelectedIndex());
var pane : JOptionPane = JOptionPane.showInputDialog("Edit Page","Page Name:",null,pageName);
}

Any help appreciated.

Thanks!

scotru

unread,
Jul 8, 2012, 3:41:28 PM7/8/12
to aswing-...@googlegroups.com
Answered my own question--use  ClickCountEvent  
Reply all
Reply to author
Forward
0 new messages