Forums Register Login

JOptionDialog

+Pie Number of slices to send: Send
I am creating a program where a JOptionDialog comes up part the way through a task and gets the user to change what they are doing. The problem I get is that the person would be typing and the button keeps being pressed immediately when they press the space bar.

Is there away to disable the spacebar or return key from pressing the button or a way to shift focus away from the "ok" button which is selected by default.

Thanks for any help,
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2104 times.
Similar Threads
applets-javascript
Problem with keystrokes and JOptionPane
JOptionPane modal for only one window.
Javascript Back button
web link in option dialog
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 05:38:07.