Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

somw swing problem ..

 
Siddharth Mehrotra
Ranch Hand
Posts: 185
  • 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
  • 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also try
setLocationRelativeTo(null);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic