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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: somw swing problem ..
 
Similar Threads
ShutDownHandling for Swing Application
Query about event for refresh button??
Parent and child window cncept in java swing
Display Font Dialog Box
Shutdown Hook