Article View: borland.public.jbuilder.java.language
Article #19192Re: How I can to center dialogs in the screen??
From: Greg Dickson
Date: Fri, 06 Mar 1998 00:00
Date: Fri, 06 Mar 1998 00:00
44 lines
1780 bytes
1780 bytes
Try
myDialog window = new myDialog (this ,"",true);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
window.pack();
window.setLocation((d.width - window.getSize().width) / 2,
(d.height - window.getSize().height) / 2);
The only prob you may have is with X windows virtual screens as it may
be centred to the virtual screen
Greg Dickson
**** Witchcliffe WA
freelance programing
* ;) *** witchy@netserv.net.au
(java & perl)
***** http://www.netserv.net.au/witchy/
Linux System Admin
************
"I've been boiling this egg for hours and it's still not
soft"
M. Calomarde Gomez wrote in message <34FFCBC4.35C283AC@ctv.es>...
|Hi :-)
|
|I need to develop a multiplataform application with Java (of course).
|
|But I have a problem, when I show a Dialog from mi "Principal" frame,
|the dialog is not in the center of the screen, and, I don�t know how
I
|can do this.
|
| THANX :-)
|
|--
|-----
|M. Calomarde Gomez, KLO/
|Programaci�n y teletrabajo
|
|klosr@ctv.es
|http://www.ctv.es/USERS/klosr
|
|
Technical Details
Message-ID:
<6dp4m7$q6h7@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34FFCBC4.35C283AC@ctv.es>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,cda3e1af8aa1aec6 X-Google-Attributes: gidf74b3,public From: "Greg Dickson" <witchy@netserv.net.au> Subject: Re: How I can to center dialogs in the screen?? Date: 1998/03/06 Message-ID: <6dp4m7$q6h7@forums.borland.com> X-Deja-AN: 331427338 Content-Transfer-Encoding: 8bit References: <34FFCBC4.35C283AC@ctv.es> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language