Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2047
| From | "Daniel Kraft" <daniel.kraft@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Problem with loaded i |
| Message-ID | <f79qf5$55i$1@newsreader2.utanet.at> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <slrnf9fano.1tdq.aggedor@earl-grey.cloud9.net> |
| Date | 2011-04-27 15:36 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui >> Thank you very much, that solved my very problem... I'm sorry for this >> stupid mistake -- however, why was the full image painted when >> hiding/showing the window although the offscreen-image was not resized? >> >> Was this simply "by chance" or is there a stronger reason why that happend? > > You can learn the answers these questions by reading another part of my > previous followup that you did not quote in your reply. Here is that > part again: > > You are likely seeing different redrawing results from pack() and > hiding-and-showing because one ends up invoking update while the other > ends up invoking paint. See > > http://java.sun.com/products/jfc/tsc/articles/painting/index.html#awt > > for a description of "Painting in the AWT". > > Over-simplifying: > > - When a Java program executes repaint (either directly in code you write > or in the implementation of standard java methods, such as pack) the > update method will be called. Your update method clipped to the size > of the original image. > > - When the windowing system of the computer on which a Java program is > running determines that a window needs to be repainted, the paint method > will be called. Your paint method did not clip to the size of the > original image. Oh, I see -- up to now I thought repainting would *always* be done via update, no matter if I called repaint() manually of the window system determined that a repaint was needed. Once more, thank you! Daniel -- Got two Dear-Daniel-Instant Messages by MSN, associate ICQ with stress -- so please use good, old E-MAIL! --- * 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 | Next — Previous in thread | Find similar | Unroll thread
Problem with loaded image "Daniel Kraft" <daniel.kraft@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
Re: Problem with loaded i "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
Re: Problem with loaded i "A. Bolmarcich" <a..bolmarcich@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
Re: Problem with loaded i "Daniel Kraft" <daniel.kraft@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
Re: Problem with loaded i "A. Bolmarcich" <a..bolmarcich@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
Re: Problem with loaded i "Daniel Kraft" <daniel.kraft@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000
csiph-web