Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is bug in Oracle JDK 7 (it cannot be reproduced in Open JDK 7 by the way).</p> <p>To fix this you can make a workaround (yes, this is just a workaround, there is no guarantees that it won't break with some Java update) so that the window created for popup-menu will become non-opaque as soon as it shows up, then it will be displayed properly. Atleast for now. Here is how this can be done for Java version 7 and later:</p> <pre><code>PropertyChangeListener propertyChangeListener = new PropertyChangeListener () { @Override public void propertyChange ( final PropertyChangeEvent evt ) { if ( evt.getNewValue () == Boolean.TRUE ) { // Retrieving popup menu window (we won't find it if it is inside of parent frame) final Window ancestor = getWindowAncestor ( popupMenu ); if ( ancestor != null &amp;&amp; ancestor.getClass ().getCanonicalName ().endsWith ( "HeavyWeightWindow" ) ) { // Checking that parent window for our window is opaque, only then setting opacity final Component parent = ancestor.getParent (); if ( parent != null &amp;&amp; parent instanceof Window &amp;&amp; parent.getBackground ().getAlpha () == 0 ) { // Making popup menu window non-opaque ancestor.setBackground ( new Color ( 0, 0, 0, 0 ) ); } } } } private Window getWindowAncestor ( Component component ) { if ( component == null ) { return null; } if ( component instanceof Window ) { return ( Window ) component; } for ( Container p = component.getParent (); p != null; p = p.getParent () ) { if ( p instanceof Window ) { return ( Window ) p; } } return null; } }; popupMenu.addPropertyChangeListener ( "visible", propertyChangeListener ); </code></pre> <p>You will have to put some more effort if you also want to support JDK 6- versions because that code won't even compile on earlier JDK versions (there are no "set/getBackground" methods in Window in earlier versions).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload