How can I specify the position of a JOptionPane. Can anyone make a class that extends JOptionPane.showInputDialog that also takes in an x,y position?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use JOptionPane’s setLocation(…) method. OR Instead of using
JOptionPaneyou can extends a JDialog, and then specify it’s location on the screen.Here is one working code sample as adviced by @HovercraftFullOfEels , just this example will help you to get input from the user as you asked for :