Path: csiph.com!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 20:25:57 +0200 Organization: Decebal Computing Lines: 33 Message-ID: <87vazy4zm2.fsf@Equus.decebal.nl> References: <87twfk93vu.fsf@Equus.decebal.nl> <8737n36ucx.fsf@Equus.decebal.nl> <878twu6i0l.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="12baf5125b19322b899c79c2e3878015"; logging-data="15006"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PKDq8pqRxMZXa1GM0gANmisxE4QCA+cI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:fGfj1mpjud8hLF1Q0LhMnCWN5Ag= sha1:9LtPiS3IKkVXWT7+oeJZxJemYlc= Xref: csiph.com comp.lang.java.programmer:35066 On Thursday 21 Jul 2016 19:25 CEST, Eric Douglas wrote: > On Thursday, July 21, 2016 at 1:14:08 PM UTC-4, Cecil Westerhof wrote: >> > > I never or rarely use pack, though many examples on the web do. It > automatically sets the size and location of your controls based on > their size values, the layout, and the other controls on the same > pane. In our application that's irrelevant since we use > non-resizeable windows and fixed locations and widths. The pack > values have to do with one of the sizes (each control has getSize(), > getPreferredSize(), getMinimumSize(), getMaximumSize()) and whether > the control is visible. In this case I think I prefer non re-sizeable also. So I did that already. I just have one little problem. At the moment I do: crop.setBounds( 10, imageHeight + 10, 80, 30); load.setBounds( 110, imageHeight + 10, 80, 30); imageInfo.setBounds( 10, imageHeight + 50, 500, 30); selectInfo.setBounds(10, imageHeight + 90, 500, 30); setSize(imageWidth + 10, imageHeight + 160); because title and things like that takes room, but I do not know how much. How can I retrieve these values? Then the application looks a little better and I do not have to be afraid it will not be OK on other platforms. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof