Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

Ctrl + Tab functionality in the tabbed panes

Thread view: 
srinivas.veeranki@gmail.com - 27 Jul 2006 11:22 GMT
Hi All,

Here i have a problem with a JTabbedPane. I want the functionality like
arrow keys  for the JTabbedPane. If i press the Ctrl +Tab, It should
have to show the next focusablle tab.

How can i achieve the this type of functionality.

Thank you all.

Srinivas
Andrew Thompson - 27 Jul 2006 13:03 GMT
...
> Here i have a problem with a JTabbedPane. I want ...

You can get pretty much everything you want by
going through the tutorial linked from this thread..
<http://groups.google.com/group/comp.lang.java.gui/msg/0b7600e884ee6d71>

Andrew T.
srinivas.veeranki@gmail.com - 27 Jul 2006 14:40 GMT
Hi !

Thanq very much for ur response.

I also need the ctrl + tab functioanlity for the Tabbed panes..

Thanks

Srinivas.

> ...
> > Here i have a problem with a JTabbedPane. I want ...
[quoted text clipped - 4 lines]
>
> Andrew T.
Andrew Thompson - 27 Jul 2006 15:56 GMT
(Please refrain from top-posting.)

> I also need the ctrl + tab functioanlity for the Tabbed panes..

The information is in the same tutorial.

( In fact, I was about to post an entirely different version
of that first source - it achieved what you wanted in
another, very bad & hackish way.   But it only took
me a couple of minutes searching that tutorial to
find the correct way.  Maybe you should read it. )

Andrew T.
srinivas.veeranki@gmail.com - 27 Jul 2006 16:11 GMT
Hi...

For achieving the ctrl + tab functioality for JTabbedPane , I over
write the addkeyStroke() method,but its not supporting the this
functioality. If i press the ctrl + tab , the focus is going to next
focusable component in that tab. Its not moving to the next tab.
I used the following code

Set forwardKeys = frame.getFocusTraversalKeys(
            KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
   Set newForwardKeys = new HashSet(forwardKeys);
   newForwardKeys.add(
              KeyStroke.getKeyStroke(KeyEvent.VK_TAB
,KeyEvent.CTRL_DOWN_MASK, true));
   frame.setFocusTraversalKeys(
            KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
              newForwardKeys);

I didn't find the ctrl + tab focus traversal for the JTabbed Pane.

Thanks

Srinivas.

> (Please refrain from top-posting.)
>
[quoted text clipped - 9 lines]
>
> Andrew T.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.