Why does a return inside a TextField in Java AWT make a bing sound in dialogs? I have an old AWT program here, and run it under Java 7. It does not seem to matter, if the TextField has an action listener or not.
Update: I tried to isolate the problem writing another application with a dialog, but there is no beep. I also noticed that cursor up and down work in one program and in the other they cause a bing. However, there is no obvious code which is called to handle keystrokes.
Update: I also discovered that the right mouse button does not work in the beeping application.
Thanks for answers and help.
Perhaps it is using Toolkit.getDefaultToolkit().beep();
to indicate you pressed return when no text is present or for other validation reasons?
This may be invoked via the look-and-feel. Is this application loading some custom look-and-feel? If so, try disabling it and see if the behavior goes away.
我发现了问题:它是Java7。在Java 6中一切正常。这是Oracle的工作,可能对此我们无能为力。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.