getRootPane() default button - Is this a bug?
问题 I have made an SSCCE. Please note that it must be Windows Look&Feel. import java.awt.*; import javax.swing.*; public class DefaultButtonBug { private static final String LAF_WINDOWS = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"; public static void main(String[] args) { try { UIManager.setLookAndFeel(LAF_WINDOWS); } catch (Exception ex) { System.out.println("Setting the L&F failed so I cannot reproduce the bug."); System.exit(1); } EventQueue.invokeLater(new Runnable() { @Override