Due to how AbstractDecorationPainter.contains ( ... ) method is implemented and the fact that it is reused for RootPanePainter implementation - any events on JRootPane that occur outside of the decoration shape specified in rootpane style are completely ignored.
Usually it isn't noticeable, but it does cause issues for some components that might be displayed within the JRootPane (on layered pane), like JComboBox. Here is an example:
In this case it is impossible to select 3rd item in the popup menu with mouse.
Example code:
public class Example
{
public static void main ( final String[] args )
{
SwingUtilities.invokeLater ( new Runnable ()
{
@Override
public void run ()
{
WebLookAndFeel.install ();
final WebFrame frame = new WebFrame ( StyleId.frameDecorated );
frame.setLayout ( new FlowLayout () );
frame.add ( new JComboBox ( new String[]{ "1", "2", "3" } ) );
frame.setDefaultCloseOperation ( WindowConstants.EXIT_ON_CLOSE );
frame.pack ();
frame.setLocationRelativeTo ( null );
frame.setVisible ( true );
}
} );
}
}
This requires a small fix in RootPanePainter implementation.
Due to how
AbstractDecorationPainter.contains ( ... )
method is implemented and the fact that it is reused forRootPanePainter
implementation - any events onJRootPane
that occur outside of the decoration shape specified inrootpane
style are completely ignored.Usually it isn't noticeable, but it does cause issues for some components that might be displayed within the
JRootPane
(on layered pane), likeJComboBox
. Here is an example:In this case it is impossible to select 3rd item in the popup menu with mouse.
Example code:
This requires a small fix in
RootPanePainter
implementation.