Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JOptionPane.showInputDialog and backspace key

 
Lanny Gilbert
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am popping a window using JOptionPane.showInputDialog().

Inside the window that opens, the backspace key won't work. I know that I somehow need to "rebind" it, but have tried several things and can't figure out how to do it.

Any ideas???

I also posted this in the Applets forum, but it's really a Swing question.
 
Nick Meverden
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String inputValue = JOptionPane.showInputDialog("Please input a value");

write a test case on your system because "backspace" should work fine.
 
Lanny Gilbert
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my exact code...

JOptionPane.showInputDialog(this, "Enter a value between 200-206", "200");

which shows an input dialog with 200 as the starting value. Backspace doesn't work in this case....
 
Nick Meverden
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say, if this is on FreeBSD check and make sure your num-lock is not enabled.
 
Lanny Gilbert
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not FreeBSD.. Applet which has this code is running on XP with 1.4.2_10 JRE.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!