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

Positioning JOptionPane on the screen

 
Rus Corina
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a frame, which occupies almost all the screen, and at some point, if you press some buttons, a JOptionPane opens with a message. The problem is that the JOptionPane opens right below the end of my Frame, and only a very small part of it is visible. Does anybody know if I can modify the position of a JOptionPane on the screen? I want to put it in the center.
 
Rob Camick
Ranch Hand
Posts: 2475
8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JOptionPane is centered on whatever component you specify as the parent component. Try using the frame as the parent component.
 
Rus Corina
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added the frame to a scrollbar, and I specified the scrollbar as parent component
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic