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 23:52:02 +0200 Organization: Decebal Computing Lines: 33 Message-ID: <87r3am4q2l.fsf@Equus.decebal.nl> References: <87twfk93vu.fsf@Equus.decebal.nl> <8737n36ucx.fsf@Equus.decebal.nl> <878twu6i0l.fsf@Equus.decebal.nl> <87vazy4zm2.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="12baf5125b19322b899c79c2e3878015"; logging-data="25775"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EXviAlg3F69e/Cyjbdr1bPZ7zpwUnskg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:dFD4bcxz72GonghUMiDF+fcKENo= sha1:Fi4MQkiwi2kx+ZMwL8Q046PTcNk= Xref: csiph.com comp.lang.java.programmer:35074 On Thursday 21 Jul 2016 21:37 CEST, Eric Sosman wrote: > On 7/21/2016 2:25 PM, Cecil Westerhof wrote: >> [...] >> 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. > > Possibly useful as a starting point: > > Dimension screenSize = > Toolkit.getDefaultToolkit().getScreenSize(); > > (Disclaimer: I've only used this on single-screen machines; you need > to work harder if there are multiple displays.) That was not what I mend: I had problems with that it seemed I needed to set the size greater as the combination of what I put in the frame. But it could be that I made an error. I need to look into it better. But this has not the highest priority. Is more icing on the cake. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof