Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: How do you change tab stop index in Swing?

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do you change tab stop index in Swing?

    I am sorry for a very simple question, but I am really at loss about this. I am very new with Java, learning it with Murach Java Programming at the moment, with Java 7. What I want to know is, how can I change the order of the focus change when we press the tab key in keyboard? In Visual Basic .NET it is called Tab Index, what is it called in Java? I would love to use Java lingo, but mine is very limited currently.

    Thank you so much.


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: How do you change tab stop index in Swing?

    Are you asking for help with a key listener, or how to request focus, or something else?

  3. #3
    Junior Member
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How do you change tab stop index in Swing?

    OK, we may be talking about two different thing. If we have, say 3 textboxes in a form, say textbox 1, textbox 2, and textbox 3. If we load the form, the focus usually on textbox 1. If we press tab key, it usually goes to textbox 2, and if you press tab key again, it will go to textbox 3. This is done without any coding for key listener, right? Now, if I want to change the order from textbox 1 to textbox 3 first before textbox 2, can I do it without coding for key listener or that is the only way to do it?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: How do you change tab stop index in Swing?

    Take a look at the tutorial:
    How to Use the Focus Subsystem (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features)
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Grid, tab do pacote Swuing
    By JeovaneOtoniel in forum Member Introductions
    Replies: 2
    Last Post: June 3rd, 2012, 01:37 PM
  2. previous tab's functions no longer working when new tab is created
    By captain in forum What's Wrong With My Code?
    Replies: 13
    Last Post: April 26th, 2012, 01:12 PM
  3. Add extended JPanel on selected index change of JComboBox
    By mikejr76 in forum AWT / Java Swing
    Replies: 3
    Last Post: February 20th, 2012, 10:32 PM
  4. JTabbedPane with two Panels in the same tab?
    By cadarn in forum AWT / Java Swing
    Replies: 1
    Last Post: August 3rd, 2011, 10:48 AM
  5. Replies: 3
    Last Post: April 14th, 2010, 07:33 PM