demitriusbelai commented on PR #6391:
URL: https://github.com/apache/netbeans/pull/6391#issuecomment-1722399745

   Guys! I remove `JDialog.setDefaultLookAndFeelDecorated(true)` from MR 
because Generate code popup was showing with decoration:
   
   
![Screenshot_20230917_021729](https://github.com/apache/netbeans/assets/12846384/88a8df54-30f5-4db0-a710-135da4fb9cf9)
   
   I chaged PopupUtil and It worked:
   
   ```diff
   --- a/ide/editor/src/org/netbeans/modules/editor/codegen/PopupUtil.java
   +++ b/ide/editor/src/org/netbeans/modules/editor/codegen/PopupUtil.java
   @@@ -38,6 -38,6 +38,7 @@@ import javax.swing.AbstractAction
     import javax.swing.Action;
     import javax.swing.JComponent;
     import javax.swing.JDialog;
   ++import javax.swing.JRootPane;
     import javax.swing.KeyStroke;
     import javax.swing.SwingUtilities;
     import org.openide.windows.WindowManager;
   @@@ -81,6 -81,6 +82,7 @@@ public final class PopupUtil  
             popupWindow.setUndecorated(undecorated);
             popupWindow.getRootPane().getInputMap( 
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ).put( ESC_KEY_STROKE, CLOSE_KEY 
);
             popupWindow.getRootPane().getActionMap().put( CLOSE_KEY, 
CLOSE_ACTION );
   ++        popupWindow.getRootPane().setWindowDecorationStyle(JRootPane.NONE);
           
           //set a11y
           String a11yName = content.getAccessibleContext().getAccessibleName();
   ```
   
   However, I looked for setUndecorated in source code and found a lot of. So 
it is better keep JDialog untouched.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to