• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

on Control+tab how to show next tab in tabbedpane

 
kallam reddy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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;
 
kallam reddy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic