T
Timasmith
Having played around with someones variant of Swingworker I have found
pleasing results with using a background thread for actions initiated
by a table, tree or menu. Clicking on the said item kicks off the
action while letting the gui items respond appropriately. In fact
rather than hardcoding it everywhere I extended an ActionListener to do
just that.
Now when it comes to buttons there is a different story. When you
press a button you want a good solid push but with the background
thread I get a bouncy button that immediately springs back to its
position - too quickly in my estimation. Since the action it is
performing may be quick or slow its difficult to guage the slow ones
only for background processing.
I guess I could introduce an artifical pause for the button but any
other ideas on that.
The other item that is a bit of a pain is setting the hourglass for
menu actions. Since the parent of the menu is not a component I cant
use that to flip the hourglass.
Is there a way to flip the hourglass regardless of the control you are
waving over? Gets a little complex perhaps as you might want to
hourglass one frame but not another.
Finally my other beef is that a modal form on one frame also blocks
another frame, perhaps 1.6 fixes that I will look into it when it is
released.
tia
pleasing results with using a background thread for actions initiated
by a table, tree or menu. Clicking on the said item kicks off the
action while letting the gui items respond appropriately. In fact
rather than hardcoding it everywhere I extended an ActionListener to do
just that.
Now when it comes to buttons there is a different story. When you
press a button you want a good solid push but with the background
thread I get a bouncy button that immediately springs back to its
position - too quickly in my estimation. Since the action it is
performing may be quick or slow its difficult to guage the slow ones
only for background processing.
I guess I could introduce an artifical pause for the button but any
other ideas on that.
The other item that is a bit of a pain is setting the hourglass for
menu actions. Since the parent of the menu is not a component I cant
use that to flip the hourglass.
Is there a way to flip the hourglass regardless of the control you are
waving over? Gets a little complex perhaps as you might want to
hourglass one frame but not another.
Finally my other beef is that a modal form on one frame also blocks
another frame, perhaps 1.6 fixes that I will look into it when it is
released.
tia