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


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

Re: problem with setting

From "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this>
Subject Re: problem with setting
Message-ID <1164771873.227973.297960@14g2000cws.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
References <1164729419.208051.309040@h54g2000cwb.googlegroups.com><1
Date 2011-04-27 15:26 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
Andrew Thompson wrote:
>
> This post is a follow on to my post to Oliver.
> Please read it first.
>
> In this situation, I would ask..
> "So what is going to go *inside* centerPanel,
> and why is it not logical for centerPanel to be
> the exact preferredSize of its *contents*?"
>
> As a wider question, is this 'Please Wait' message
> more suited to a JProgressBar in a floating
> JDialog or JOptionPane?
>
> Andrew T.

A JProgressBar is very well suited if you have a task where the
duration, or the criteria for finishing a task is known.  What about
those times where the completion of a task isn't so clearly known?

I'm translating a "busybar" from a couple of other languages I work
with over to Java.  So instead of building a left to right stack of
rectangles to the end of the dialog (as in JProgressBar), I have two
rectangles that bounce back and forth in "pong"-like fashion until the
thread dies.  IMHO, this is better feedback for the users than simply
waiting on an hourglass cursor (again, only when the length of the task
completion is unknown); they see the application is performing an
action and they can relate to that.  What I have in these other
languages is pretty elegant.  I grew frustrated with seeing all the
hacked flavors of progressbars out there, rife with code smells and
bugs, and decided to emulate one instead.  It involves drawing two
contrasting rectangles (and one the same color as the background to
'erase' tracks) and using some remainder division and a timer to
control the scrolling back and forth.

---
 * 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 | NextPrevious in thread | Next in thread | Find similar


Thread

problem with setting a pa "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
  Re: problem with setting "Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
  Re: problem with setting "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
    Re: problem with setting "Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
      Re: problem with setting "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
    Re: problem with setting "Oliver Wong" <oliver.wong@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
    Re: problem with setting "Fred Kleinschmidt" <fred.kleinschmidt@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
  Re: problem with setting "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
  Re: problem with setting "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
  Re: problem with setting "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
  Re: problem with setting "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
    Re: problem with setting "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000

csiph-web