Complete repaint of everything

  • Follow


Hello.
Is it possible to force all components in an application/applet repaint
themselves? How?
Thanks.


0
Reply loquak 4/22/2004 6:42:37 PM

On Thu, 22 Apr 2004 21:42:37 +0300, "loquak" <liam_parc@hotmail.com>
wrote or quoted :

>Is it possible to force all components in an application/applet repaint
>themselves? How?

masterFrame.repaint();

This triggers repaints of everything inside if necessary.

see http://mindprod.com/jgloss/repaint.html

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
0
Reply Roedy 4/22/2004 9:34:49 PM


In article <oieg809thr5v8h6iip4felkjrbdmc4vva9@4ax.com>,
 Roedy Green <see@mindprod.com.invalid> wrote:

>:On Thu, 22 Apr 2004 21:42:37 +0300, "loquak" <liam_parc@hotmail.com>
>:wrote or quoted :
>:
>:>Is it possible to force all components in an application/applet repaint
>:>themselves? How?
>:
>:masterFrame.repaint();
>:
>:This triggers repaints of everything inside if necessary.
>:
>:see http://mindprod.com/jgloss/repaint.html
>:
>:--
>:Canadian Mind Products, Roedy Green.
>:Coaching, problem solving, economical contract programming. 
>:See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

I'm not at all familiar with AWT and can really only address Swing.

In Swing, so far as I'm aware, there's no way to have an application 
repaint everything if it contains multiple top-level windows (i.e., 
JFrame or JDialog) unless action is taken on each one.  The page at 
<http://java.sun.com/products/jfc/tsc/articles/painting/index.html> has 
some good information on painting in both Swing and AWT, and will tell 
you that the repaint() call in Swing does not force a complete redraw in 
all cases.  It essentially schedules an event to redraw items in the 
dirty region of the specified components, which is what the 
RepaintManager is all about.

The key phrase in the above reply is "if necessary", which makes it 
technically accurate -- in Swing, repainting will paint whatever is 
necessary per the RepaintManager's designated dirty regions.  But if the 
OP wants to literally redraw everything, as I suspect, then the 
repaint() call might not really do the trick.

= Steve =
-- 
Steve W. Jackson
Montgomery, Alabama
0
Reply Steve 4/23/2004 7:02:39 PM

On Fri, 23 Apr 2004 14:02:39 -0500, "Steve W. Jackson"
<stevewjackson@charter.net> wrote or quoted :

>But if the 
>OP wants to literally redraw everything, as I suspect, then the 
>repaint() call might not really do the trick.

In windows you can force a redraw of all apps including non java ones
with a right click refresh on a piece of unoccupied desktop.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
0
Reply Roedy 4/23/2004 7:34:50 PM

3 Replies
177 Views

(page loaded in 0.051 seconds)

Similiar Articles:




7/28/2012 5:30:18 AM


Reply: