Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6811
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Subject | Re: java.awt.Frame - How to repaint without background update |
| From | Ian Shef <invalid@avoiding.spam> |
| References | <j1gl4o$t0j$1@news.onet.pl> <j1h2au$h7k$1@dont-email.me> |
| Message-ID | <Xns9F388236C6C85vaj4088ianshef@138.125.254.103> (permalink) |
| Date | 2011-08-05 19:48 +0000 |
| Organization | Raytheon Company |
Knute Johnson <september@knutejohnson.com> wrote in news:j1h2au$h7k$1@dont-
email.me:
> On 8/5/2011 4:45 AM, MaciekL wrote:
>> solved:
>>
>> Adding additonal update method makes that Background is not displayed
>>
>> public void update(Graphics g) { paint(g); }
>>
>> Maciek
>>
>
> That's because update() clears the background.
...and, for heavyweight components such as Frame, repaint(...) causes update
(...) to be called.
See "Painting in AWT and Swing" at
http://java.sun.com/products/jfc/tsc/articles/painting/
(but be aware that later versions of Java have reduced some of the
restrictions regarding mixing lightweight and heavyweight components).
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar
Re: java.awt.Frame - How to repaint without background update MaciekL <__nospam__maclab@o2.pl> - 2011-08-05 13:45 +0200
Re: java.awt.Frame - How to repaint without background update Knute Johnson <september@knutejohnson.com> - 2011-08-05 08:30 -0700
Re: java.awt.Frame - How to repaint without background update Ian Shef <invalid@avoiding.spam> - 2011-08-05 19:48 +0000
csiph-web