jrhenderson1988 / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

find and replace dialog ignores focus on 'enter' #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ctrl-h to open find and replace dialog
2. press tab until 'replace' is focused
3. press 'enter'

What is the expected output? What do you see instead?
expected: 'replace' button is clicked
actual: 'next' button is clicked

What version of the product are you using? On what operating system?
jsyntaxpane-0.9.5-b29.jar, xp64

Original issue reported on code.google.com by javlo...@gmail.com on 28 Apr 2010 at 4:53

GoogleCodeExporter commented 9 years ago
Apparently, this is a Look And Feel dependent behavior.  It will NOT occur on 
Windows 
LAF, but will be an issue on Metal, and possibly others. 
And it is not just for jsyntaxpane dialogs.

To have buttons respond to Enter in addition to Spacebar, you need to add the 
following line of code:

UIManager.put("Button.defaultButtonFollowsFocus", Boolean.TRUE);

Original comment by ayman.al...@gmail.com on 6 May 2010 at 7:05