JDK-6300582 : Focus indicator is missing on buttons in JToolBars in windows look and feel
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1,1.4.2,5.0,6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2005-07-22
  • Updated: 2010-05-09
  • Resolved: 2005-09-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b53Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Subject says it - run "javaws -viewer", on Windows.  Select some cached application - buttons to launch, view JNLP and so on get enabled.  Select choise with "Show" options with mouse, close it.  Now press Tab.  Button "Run the selected application online" will receive focus - but its visual representation will not change.  To verify that it is focused press Space - button will be pressed and application will be launched.  Reproducible with 6.0b43

Comments
EVALUATION New CR for turning off focusability of toolbar buttons is 6316673.
10-02-2006

EVALUATION The problem here is that Windows (XP at least) doesn't let you tab between toolbar buttons in native applications. They are not focusable. In Swing apps we allow this. When writing Swing application to run on Windows the author should disable the focusability on toolbar buttons but Swing does not enforce this. It's simply a recommendation. Given that there are existing applications which don't do the right thing I recommend we modify the XP L&F to draw the focus rects. Then if the author does the right thing it's not an issue and if they don't at least the application is still usable from the keyboard. (ie. You don't see the focus go off into oblivion). This is preferable to forcibly making the toolbar buttons not be focusable. During our discussions of this bug someone brought up the possibility of having a client property or UI defaults to control this behavior. This is a good idea but globally controlling the focusability of toolbar buttons is a separate issue from whether to draw the focus rect when they *do* get focused. Since this is the case I have started a separate CR to address the client property issue.
08-09-2005

EVALUATION We purposely do not draw focus indicators for buttons on a toolbar. As far as I can tell this is bad, in that if the button gets focus you'll have no visual indication of that. If customers don't want the buttons in a toolbar focusable they can make the buttons non-focusable, but we should draw the indicator if the button gets focus.
03-08-2005