Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: What do you think of my CropImage class Date: Thu, 21 Jul 2016 15:37:55 -0400 Organization: A noiseless patient Spider Lines: 26 Message-ID: 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; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 21 Jul 2016 19:38:07 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="22e5ab429c5a4bb738666b9c52e40d69"; logging-data="27038"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Vk7V7LSjzkBLaCO6RQVmQ" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: <87vazy4zm2.fsf@Equus.decebal.nl> Cancel-Lock: sha1:DiZRL5tSjz5og4yWSYzRk1n4FnU= Xref: csiph.com comp.lang.java.programmer:35068 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.) -- esosman@comcast-dot-net.invalid "Don't be afraid of work. Make work afraid of you." -- TLM