OptionPane.GetInputDialog. Is it really Modal?

OptionPane.GetInputDialog. Is it really Modal?

I have a button (ReCalc) which loads a dialog with a textbox. If I use the mouse to click 'ReCalc" and to click the 'OK' in the dialog then all is ok. If I put the focus on 'ReCalc' and hit 'Enter' then the dialog loads but the focus is not in the text box. I must put the focus there with the mouse. If I then hit 'Enter' the 'Recalc' button fires again and a second InputDialog opens. In order to get the 'OK' button to fire I must tab focus to it. The problem is then that the InputDialog closes and the 'ReCalc' button fires and a new InputDialog opens. The InputDialog does not appear to consume the Key action event. I get around it by setting the 'ReCalc' focusable and enabled properties to false after it has been activated. When the listener has finished my required action I then re-enable them. This has the benefit of making the 'OK' button in the dialog the default key. The Java API describes the OptionPane as being modal but this doesn't appear to be the case. Any comments appreciated. PS. Using Java 1.8.1 in Linux.

View Answers









Related Tutorials/Questions & Answers:
OptionPane.GetInputDialog. Is it really Modal?
ModuleNotFoundError: No module named 'monocle_modals'
Advertisements
ModuleNotFoundError: No module named 'django-modals'
ModuleNotFoundError: No module named 'django-bstrap-modals'
ModuleNotFoundError: No module named 'django-bstrap-modals'
ModuleNotFoundError: No module named 'Really'
Is Alexa really AI?
Is data science really in demand?
Really Simple History (RSH)
ModuleNotFoundError: No module named 'mandrill-really-maintained'
ModuleNotFoundError: No module named 'really-cool-script'
Is the data science job market really dead?
I really hate my data scientist job
Hey Guys really need to learn - Java Beginners
I really need a tutor for Java program that has to do with multithreading and gui!
I really hate my data scientist job. What's your experience?
servlet not working properly ...pls help me out....its really urgent
What you Really Need to know about Fashion
really need help on how to write this program plz some 1 help out. - Java Beginners
I really need help with this assignment question Please help me out Please
Social Media Marketing: Do you really need it?
Login form
How To Become A Good Software Developer?
Hibernate Tools Download
GPS Car
PC To Phone (PC-Phone) VoIP Directory
Tattoo Ideas for Girls with Quotes
Downloading MyFaces example integrated with tomahawk
Keep Your Current Job While You Seek a New One
Greatest Management Theorists of Twenty First Century
Web 3.0 Design
How would you honestly evaluate the strengths and weaknesses of your previous/current company/boss/team?
Greatest 21st Century Companies Where Business Management Became Most Creative
10 Unusual Technologies to Come in a Big Way
Tattoo Ideas for Couples
Top 10 Health Applications for Android
Top 10 Web Trends of Present Time
Modal Panel example in Wicket
What is review of Hibernate in Java?
What is review of Hibernate in Java?
Hi
Record and Save Video using Java
What is review of Hibernate in Java?
AJAX Queue Class
stdclass object php - PHP
dumps - SQL
Database
LOGIC
LOGIC
Jave writing method - Java Beginners

Ads