Results 1 to 8 of 8
- 07-25-2008, 11:07 AM #1
- 07-25-2008, 11:31 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
As far as I know there is an automatic order to set the index. It's, automatic indexing are added from left to right and from top to bottom order. I never seen any other way to change this.
- 07-25-2008, 11:39 AM #3
mhm, does that mean it is not possible?!?
- 07-25-2008, 11:42 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
No way, there is a solution. But you have to be careful to use it.
Java Code:FocusTraversalPolicy()
- 07-25-2008, 11:44 AM #5
ah ok, i will look at this. Thank you
- 07-25-2008, 11:50 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Ya, have a try and see. It's not difficult at all. Set the order from one to the other in the order you want. Just like indexing.
- 07-25-2008, 12:16 PM #7
Oh thats not what I wanted, the Indexorder is correct, but I can only naviagte with TAB and SHIFT+TAB. And I wanted to navigate with SHIFT + TAB, TAB and with Cursor UP, Cursor DOWN. But you send me in the right Direction. It works with.
Thank you very much!!!Java Code:public class AddContactView extends javax.swing.JFrame { ... ... ... public AddContactView() { initComponents(); contact = new Contact(); Set<AWTKeyStroke> forwardKeys = getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS); Set<AWTKeyStroke> backwardKeys = getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS); Set<AWTKeyStroke> newForwardKeys = new HashSet<AWTKeyStroke>(forwardKeys); Set<AWTKeyStroke> newBackwardKeys = new HashSet<AWTKeyStroke>(backwardKeys); newForwardKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0)); newBackwardKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_UP,0)); this.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, newForwardKeys); this.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, newBackwardKeys); } ... ... ...Last edited by hannehomuth; 07-25-2008 at 12:17 PM. Reason: Forgot something
- 07-25-2008, 12:22 PM #8
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
It's pleasure at all. I've forget that key strokes there.
Similar Threads
-
How to Hide cursor
By priya in forum Java SoftwareReplies: 1Last Post: 12-09-2010, 09:39 PM -
How to navigate a SWT table cells with arrow keys
By Java Tip in forum SWTReplies: 0Last Post: 07-11-2008, 03:07 PM -
Cursor
By serfster in forum New To JavaReplies: 2Last Post: 06-15-2008, 05:49 AM -
GUI cursor change problem
By ludragon in forum Advanced JavaReplies: 2Last Post: 01-09-2008, 10:03 PM -
Using a cursor
By notnumber6 in forum New To JavaReplies: 3Last Post: 11-26-2007, 10:56 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks