Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #278

art of writing a responsi

From "Timasmith" <timasmith@THRWHITE.remove-dii-this>
Subject art of writing a responsi
Message-ID <1164948778.020923.279510@j72g2000cwa.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:26 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.programmer
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar


Thread

art of writing a responsi "Timasmith" <timasmith@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
  Re: art of writing a resp "Wesley Hall" <wesley.hall@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
    Re: art of writing a resp "Timasmith" <timasmith@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
    Re: art of writing a resp "Fred Kleinschmidt" <fred.kleinschmidt@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
  Re: art of writing a resp "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
    Re: art of writing a resp "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000

csiph-web