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


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

Re: Problem with loaded i

From "A. Bolmarcich" <a..bolmarcich@THRWHITE.remove-dii-this>
Subject Re: Problem with loaded i
Message-ID <slrnf9fano.1tdq.aggedor@earl-grey.cloud9.net> (permalink)
Newsgroups comp.lang.java.gui
References <f783rm$f61$1@newsreader2.utanet.at>
Date 2011-04-27 15:36 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
On 2007-07-13, Daniel Kraft <d@domob.eu> wrote:
[snip]
> 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.

---
 * 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 | Unroll thread


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