JDK-6535254 : JToolBar active/inactive state doesn't match with native toolbar in windows.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-03-16
  • Updated: 2011-01-19
  • Resolved: 2007-07-27
Related Reports
Duplicate :  
Description
Bug Info:
=========
Both windows are active state in native application but parent window is inactive state and toolbar window is active state in java application.Follow the below steps to reproduce.

Drag JToolBar and place it on top of parent window in java application.
Expected Behavior: As per native toolbar the expected behavior should be both windows(parent/toolbar) are active state.
Actual Behavior: The parent window is going to inactive state once drag the toolbar and place it on parent widow.

The toolbar shows the inactive state whenever its parent goes to inactive in native application.But JToolBar shows the inactive state whenever its parent window goes to active state.

Please find the attached images for verification.

Comments
EVALUATION After a short experiment with Wordpad, when I removed WS_EX_TOOLWINDOW exstyle from its toolbar, and it was still active together with the Wordpad main window, I see that WS_EX_TOOLWINDOW is something different from activation state. At least, it is not sufficient for Swing JToolbars to behave like the native ones. Probably, we should use some particular owner and/or include other styles/exstyles for the toolbar windows.
07-06-2007

EVALUATION After AWT provides support, we can do the right thing in Swing. Note, I think this may have at least something to do with using the WS_EX_TOOLWINDOW style.
06-06-2007

EVALUATION To fix this, I think we need help from AWT. We need to apply some style to our toolbar windows such that they match the behavior of native windows toolbars. This means the following: - active/inactive state matches windows - the toolbar dialog has the proper thinner window bar
06-06-2007