JDK-4976497 : Frame maximizes and covers taskbar using setUndecorated method
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2004-01-10
  • Updated: 2007-06-04
  • Resolved: 2007-06-04
Related Reports
Duplicate :  
Description
When using setUndecorated on a frame, clicking on the maximize button causes the window to cover up the taskbar area on the screen.  However, when you do not use this method, the screen only maximizes up to the top of the taskbar.  Is this the intended behavior?  I did not find any info on this in the api docs under setUndecorated.  This maybe something worth mentioning in the docs.

Try running the code below with setUndecorated and without.

I compiled and ran the following code below with 1.5 b33 on Win 2k
------------------------------------------------------------------
import javax.swing.*;

public class JFrameTest2 {

        public static void main(String[] args) {
                new JFrameTest2();
        }

        public JFrameTest2() {

                JFrame frame = new JFrame();
                frame.setUndecorated(true);
                frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME);

                JDesktopPane desktop = new JDesktopPane();
                frame.setContentPane(desktop);
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setSize(300,300);
                frame.setVisible(true);
        }
}
------------------------------------------------------------------

Comments
EVALUATION Dup of 4737788.
04-06-2007

EVALUATION This seems to happen with any LAF decorated frames. For example, if you set the static property on JFrame (using the Metal LAF): JFrame.setDefaultLookAndFeelDecorated(true); And then create frames... ###@###.### 2004-01-12 Name: drR10255 Date: 02/20/2004 I think, there is no problem in covering taskbar after maximizing for undecorated frames. For example, Internet Explorer covers taskbar after pressing F11. I think, this is a normal behaviour. But may be we should modify documentation to describe this. ======================================================================
25-09-2004