Path: csiph.com!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: What do you think of my CropImage class Date: Thu, 21 Jul 2016 19:03:06 +0200 Organization: Decebal Computing Lines: 26 Message-ID: <878twu6i0l.fsf@Equus.decebal.nl> References: <87twfk93vu.fsf@Equus.decebal.nl> <8737n36ucx.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="12baf5125b19322b899c79c2e3878015"; logging-data="26926"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sg9WPCo+bVO+7apk7biui13qmN3R/Qxg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:Eo9Z1AC4/JtOHC0//5UUhLtGpJU= sha1:O4xawEkcNPcTCYkCRSnBR6wbjFs= X-Homepage: http://www.decebal.nl/ Xref: csiph.com comp.lang.java.programmer:35059 On Thursday 21 Jul 2016 15:35 CEST, Eric Sosman wrote: > - You mention that "for me pack did not work," which is sort of > weird. I don't know what you tried before you settled on absolute > positioning, but I wonder: Could your layout troubles have anything > to do with the fact that CropImage extends Panel instead of JPanel? I pushed a version where I use a flag USE_PACK to show the problem. (And it also uses invokeLater.) When you compile the program as is it shows only a very small part of the image. When making the window greater at first only the picture is shown. When making it bigger at a certain point crop size comes from under the picture. When keeping to make the window bigger crop size moves to a lower position. The other parts do not even show up. So I suppose they are buried beneath the picture. When setting USE_PACK to false the absolute positioning is set back. If anybody could tell me what I am wrong … -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof