Forums Register Login

FocusTraversalKeys challenge

+Pie Number of slices to send: Send
I need to navigate through the components using the tab key and also want to perform some kind of computations once the user has pressed the tab key. I can do the calculation but he tab stays in the current field.

I�m not sure how to set the focus to the next available component.

Any help is appreciated.

+Pie Number of slices to send: Send
it might be simpler to use a focusListener, or a documentListener

here's your code as a focusListener:
as tf3 is for the 'result' - I've changed that to unfocusable,
not sure what tf4 is for

+Pie Number of slices to send: Send
Hey Meb,

In your code, implementation of keylistener methods.. call the super(parent) methods!!!
+Pie Number of slices to send: Send
Thank you both.
Don't MAKE me come back there with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1064 times.
Similar Threads
GridbagLayout help needed (this time with code tags :-) )
Twins views
JTextField Tab Order Changing
Getting sql error [Microsoft ][odbc microsoft access driver]numeric index out of range
JTextfield
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 01:04:56.