File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

somw swing problem ..

 
Siddharth Mehrotra
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Horst Dehmer
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sid,
Try to use setBounds(Rectangle) from JDialog.
Horst.
 
Siddharth Mehrotra
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Sai Prasad
Ranch Hand
Posts: 560
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also try
setLocationRelativeTo(null);
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic