Results 1 to 3 of 3
  1. #1
    javakash is offline Member
    Join Date
    Sep 2009
    Rep Power

    Unhappy AWT Focus Problem using idk 1.6.0


    I m working on a system which GUI is Swing based previously on JDK 1.4.2, recently we are upgrading our environment and moving on JDK 1.6.0.

    We are facing a component focus ordering issue on screens having BoxLayout. In previous jdk 1.4.2, the focus order was same like order of adding textboxes or other components on the panel but now on jdk 1.6.0 focus ordering is disturbed and not working like same as previous (on jdk 1.4.2).

    Is that issue is related to AWT Focus SubSystem changes ?... Any buddy can tell me the solution... :confused:

    Sorry folks due to some security issues of company i am unable to post the problem code here.....:(

    thanks in advance!!!

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Rep Power


    There being no code to look at, I can only point to the Focus tutorial.

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    I suggest extending FocusTraversalPolicy. It's not as hard as it looks, and it gives you complete control over where focus starts and where it goes from component to component.

    Essentially, you simply create a list of components in the order you want them to receive the focus. From a given component, move forward or backward through the list. You can even force the focus to loop within your list by moving from the end of the list back to the top.

Similar Threads

  1. set focus to the textfield
    By paty in forum New To Java
    Replies: 2
    Last Post: 07-09-2010, 08:28 AM
  2. Focus control in SWT
    By chandransuraj in forum SWT / JFace
    Replies: 0
    Last Post: 01-28-2009, 02:17 PM
  3. Setting focus
    By carderne in forum New To Java
    Replies: 4
    Last Post: 12-21-2008, 05:50 PM
  4. how to focus to another JTextfield?
    By birdofprey in forum AWT / Swing
    Replies: 2
    Last Post: 04-09-2008, 01:08 PM
  5. Focus
    By Marty in forum AWT / Swing
    Replies: 1
    Last Post: 05-31-2007, 02:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts