How to use Tab Order

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

How to use Tab Order

Postby mkornatzki » Mon Jul 26, 2010 3:24 am

Hi,

i try to understand how to use the "Tab Order" in SwingDesigner. If the function is documented please direct me to the place (i don't find it in the docu because of the lack of a search function).
If i click the "Tab Order" in the palette then on every component i see a yellow rectangle with an order number.
And if i click on the container-properties "tab order" i can change the order.

Now my question: what happens if i click on the yellow rectangles?
* if i click only on the rectangle than it counts up until the end (but not every time)
* if i click on the container and then the rechtange it starts at 0
* and sometimes if i click on an rectangle it changes to the last order numer

And next, even if my tab order looks as the following:
Image

if i tab through the fields the order (with the numers above) is: 3, 4, 2, 1
That means it starts in the first field and with tab the next field is the top right field.

cheers,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: How to use Tab Order

Postby Eric Clayberg » Mon Jul 26, 2010 2:05 pm

The Tab Order tool docs are here...

    1. Start by selecting the top-level container (such as the JFrame).
    2. Activate the Tab Order tool.
    3. Click the components in the desired order.
    4. Click a component more than once to increment its index.
    5. Shift+Click to exclude a component.
    6. Ctrl+Click to move the selected index to another component.
    7. Deactivate the Tab Order tool by choosing another tool (such as Selection).
Make sure you are selecting the top-level component and not the content pane. The tab order for the top-level component will take precedence.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: How to use Tab Order

Postby mkornatzki » Mon Jul 26, 2010 10:59 pm

Thanks, for your response and the link to the docu.
Now i am a bit more confused.

I tried to follow the steps in the documentation but must stop in the first step.
I select the top-level-container (JFrame) and then click the tab order... nothing happens. i mean the tab order didn't get activated. the selected tool is still selection. Do i make something wrong?
If i select the content pane i can activate the tab order but you have written that i don't have to do that.

I could follow the rest of the docu and thought i have an idea how it works.

I tried to exclude a component and to move an index and this i do couple of times then the designer hang for a second and all the tab orders are deleted :( and i could not set the tab order for the simple 4 textfields.
after that the sourcecode looks as follows:
Code: Select all
setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{getExtMenuBar(), getXtmnTest(), getMiCopy(), getMnu(), getTbar(), getVf(), getVf_1(), getVf_3(), getVf_2(), getMi(), getCbmi(), getRbmi(), contentPane}));


cheers,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: How to use Tab Order

Postby Eric Clayberg » Tue Jul 27, 2010 6:14 am

mkornatzki wrote:I select the top-level-container (JFrame) and then click the tab order... nothing happens. i mean the tab order didn't get activated. the selected tool is still selection. Do i make something wrong?

I don't know. It works fine when I try it.

At this point, I think we need to see an actual test case from you.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: How to use Tab Order

Postby mkornatzki » Fri Jul 30, 2010 6:18 am

thank you very much.

i started with a new Frame and try the tab order again and know i know to use it :)

cheers,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: How to use Tab Order

Postby Eric Clayberg » Fri Jul 30, 2010 7:52 am

Glad to hear it.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest