aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes on Control+tab how to show next tab in tabbedpane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "on Control+tab how to show next tab in tabbedpane" Watch "on Control+tab how to show next tab in tabbedpane" New topic
Author

on Control+tab how to show next tab in tabbedpane

kallam reddy
Greenhorn

Joined: Feb 04, 2002
Posts: 5
i have a tabbed pane.it has five tabs.on control + tab ihave to show next tab like that.
how to do this.tab does not fire any event ?
how it is possible?
Terence Doyle
Ranch Hand

Joined: May 30, 2001
Posts: 328
Hi Kalam,
You have to add a KeyListener to your applicacion ( if the keys work all the time ) or to the JTabbedPane ( if the keys only work when the tabbedPane has focus).
Once you do that the component is listening for the KeyEvent ( all keys - including tab fire events )
Here's some (untested) sample code;


Raising Flares debut album 'Ignition' out now

http://www.raisingflares.com

Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)
kallam reddy
Greenhorn

Joined: Feb 04, 2002
Posts: 5
thanks for reply, but if focus on tabben pane then only it fires keyevent.
i want to show next tab on click of control+tab from any of the fields in the form.
where to register key event and how to do this?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: on Control+tab how to show next tab in tabbedpane