Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1437 > unrolled thread

Taskbar hides when Swing

Started by"Goofball" <goofball@THRWHITE.remove-dii-this>
First post2011-04-27 15:33 +0000
Last post2011-04-27 15:33 +0000
Articles 3 — 3 participants

Back to article view | Back to comp.lang.java.gui


Contents

  Taskbar hides when Swing "Goofball" <goofball@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
    Re: Taskbar hides when Sw "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
    Re: Taskbar hides when Sw "Real Gagnon" <real.gagnon@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000

#1437 — Taskbar hides when Swing

From"Goofball" <goofball@THRWHITE.remove-dii-this>
Date2011-04-27 15:33 +0000
SubjectTaskbar hides when Swing
Message-ID<1176306362.928077.52620@e65g2000hsc.googlegroups.com>
  To: comp.lang.java.gui
When I maximize a JFrame that was created in the application, it hides
the Windows taskbar. I am using default Swing Look and Feel decorated
windows. Anybody knows how the problem can be fixed? Thanks.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#1438 — Re: Taskbar hides when Sw

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:33 +0000
SubjectRe: Taskbar hides when Sw
Message-ID<708cee809c376@uwe>
In reply to#1437
  To: comp.lang.java.gui
Goofball wrote:
>When I maximize a JFrame that was created in the application, it hides
>the Windows taskbar. 

Really?  When I run this code on Windows, the 
taskbar appears over the top of the bottom part 
of the JFrame.

<sscce>
import java.awt.*;
import javax.swing.*;

class FullScreenFrame {
  public static void main(String[] args) {
    JFrame f = new JFrame("Big");
    f.setDefaultCloseOperation(
      JFrame.EXIT_ON_CLOSE);
    f.setExtendedState(Frame.MAXIMIZED_BOTH);
    f.setVisible(true);
  }
}
</sscce>

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200704/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1439 — Re: Taskbar hides when Sw

From"Real Gagnon" <real.gagnon@THRWHITE.remove-dii-this>
Date2011-04-27 15:33 +0000
SubjectRe: Taskbar hides when Sw
Message-ID<Xns990F874B5A484realhowtowwwrgagnonc@140.99.99.130>
In reply to#1437
  To: comp.lang.java.gui
"Goofball" <yuriytkach@gmail.com> wrote in news:1176306362.928077.52620
@e65g2000hsc.googlegroups.com:

> When I maximize a JFrame that was created in the application, it hides
> the Windows taskbar. I am using default Swing Look and Feel decorated
> windows. Anybody knows how the problem can be fixed? Thanks.
> 

Try this :
import java.awt.*;
import javax.swing.*;

public class TestMaxJFrame extends JFrame {
  public TestMaxJFrame() {
   GraphicsEnvironment env =
     GraphicsEnvironment.getLocalGraphicsEnvironment();
   /*
     The next line determines if the taskbar (win) is covered.
   */
   this.setMaximizedBounds
              (env.getMaximumWindowBounds()); // taskbar not covered
   this.setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH);
  }

  public static void main(String[] args) {
   JFrame.setDefaultLookAndFeelDecorated(true);
   TestMaxJFrame t = new TestMaxJFrame();
   t.setVisible(true);
  }
}

Bye.
-- 
Real Gagnon  from  Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web