I'm doing some work on one of my examples for the Plug-In Programmer Guide.

In this example a plug-in prompts the user for both a search string
and a replacement string. It then replaces all of the search strings
it finds in the name of each layer with the replacement String.

It appears that the plug-in works correctly, but I have to hit the
enter key to store the strings entered in the two JTextField objects
presented on the dialog that captures data from the user.

When I "tab out" of the box the Strings are not set. I found out this
is because the "tab" key does not trigger the action listener like the
enter key does.

If I want to store the Strings input by the user I have to
specifically wire up the tab key to trigger an event, as described
here:

http://blog.marcnuri.com/blog/default/2007/06/06/Detecting-Tab-Key-Pressed-Event-in-JTextField-s-Event-VK-TAB-KeyPressed

This seems like a real pain-in-the-neck and I was surprised the
JTextField didn't automatically call the same event listener for the
tab key that it does for the enter key.

Here is my question:

Will most of our users expect the tab key to set the Strings they
provide, or will they expect that the enter key will be required to
enter the data?

As an alternative, I can add a "set values" button to the form.

I know OpenJUMP is used all over the globe, and I want to design my
form to be used as the majority of our users would expect. Any
suggestions on this GUI design issue?

Thanks a bunch.

The Sunburned Surveyor

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to