Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Edit: Oh, didn't see that you aren't able to override the frame creating and already found this solution. In that case I would check/file a bug with Netbeans how to override the creation of a JFrame.</p> <p>Here is my workaround for that bug. PortingUtils in Jide OSS and I believe doesn't use private API but you could use you own bounds calculation there.</p> <pre><code>import java.awt.BorderLayout; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.JButton; import javax.swing.JFrame; public class TestUndecoratedFrame { public static void main(String[] args) { final JFrame frame = new JFrame() { @Override public synchronized void setExtendedState(int state) { // undecorated covers task bar - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4737788 if (isUndecorated() &amp;&amp; (state &amp; MAXIMIZED_BOTH) == MAXIMIZED_BOTH) { super.setMaximizedBounds(com.jidesoft.utils.PortingUtils.getScreenBounds(this, true)); } super.setExtendedState(state); } }; frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(800, 600); frame.setUndecorated(true); frame.getContentPane().add(new JButton(new AbstractAction("Toggle maximize") { @Override public void actionPerformed(ActionEvent e) { int state = frame.getExtendedState(); if((state &amp; JFrame.MAXIMIZED_BOTH) == JFrame.MAXIMIZED_BOTH) { frame.setExtendedState(JFrame.NORMAL); } else { frame.setExtendedState(JFrame.MAXIMIZED_BOTH); } } }), BorderLayout.PAGE_END); frame.setVisible(true); } } </code></pre>
 

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