File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes somw swing problem .. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "somw swing problem .." Watch "somw swing problem .." New topic
Author

somw swing problem ..

Siddharth Mehrotra
Ranch Hand

Joined: Aug 21, 2001
Posts: 185
hi guys..
i need some help on swing..
when my application starts i ask the user to enter hos choice on connection (local/remote) through a dialog box, but this dialog box comes at the left-top corner of my application. I want this dialog to come at the center of the screen .
can anyone tell me what to do for that..


SCJP, SCJD.
Horst Dehmer
Greenhorn

Joined: Mar 29, 2002
Posts: 10
Hi Sid,
Try to use setBounds(Rectangle) from JDialog.
Horst.
Siddharth Mehrotra
Ranch Hand

Joined: Aug 21, 2001
Posts: 185
Originally posted by Horst Dehmer:
Hi Sid,
Try to use setBounds(Rectangle) from JDialog.
Horst.


thanls a lot.. u just improved a lot of asthetic value to my application..
Horst Dehmer
Greenhorn

Joined: Mar 29, 2002
Posts: 10
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
You can also try
setLocationRelativeTo(null);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: somw swing problem ..