Thread View: borland.public.jbuilder.java.swing
7 messages
7 total messages
Started by David Bolsover
Fri, 08 Oct 2004 18:32
maximise swing application window hides windows taskbar
Author: David Bolsover
Date: Fri, 08 Oct 2004 18:32
Date: Fri, 08 Oct 2004 18:32
10 lines
1132 bytes
1132 bytes
Hi all Using a JFrame for an application window - when maximised this hides the M$ taskbar - how do I prevent this? Any assitance would be helpful. Thanks David Bolsover
Re: maximise swing application window hides windows taskbar
Author: David C. Browne
Date: Fri, 08 Oct 2004 22:15
Date: Fri, 08 Oct 2004 22:15
44 lines
2191 bytes
2191 bytes
I seem to only have this problem using the default or other Metal-based
PLAFs and using JFrame decorations:
JFrame.setDefaultLookAndFeelDecorated(true);
Not using JFrame decorations or switching to the Windows or Motif look
and feel should prevent the taskbar hiding. Note that setting the look
and feel decorations to false for a particular instance of a JFrame
won't solve the problem.
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame f = new JFrame();
f.setDefaultLookAndFeelDecorated(false);
// maximize still hides taskbar
If you aren't using decorations, then I have no idea what your problem
may be.
For reference, my setup:
Microsoft Windows XP [Version 5.1.2600] (SP2)
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
Hope this helps,
David Browne
David Bolsover wrote:
> Hi all
>
> Using a JFrame for an application window - when maximised this hides the M$
> taskbar - how do I prevent this?
>
> Any assitance would be helpful.
>
> Thanks
>
> David Bolsover
>
>
Re: maximise swing application window hides windows taskbar
Author: John McGrath [TeamB]
Date: Sat, 09 Oct 2004 07:59
Date: Sat, 09 Oct 2004 07:59
26 lines
1765 bytes
1765 bytes
On 10/8/2004 at 2:32:34 PM, David Bolsover wrote:
> Using a JFrame for an application window - when maximised this hides the
> M$ taskbar - how do I prevent this?
Is it filling the display when you use the system maximize button on the
JFrame? Or are you trying to maximize the JFrame programmatically?
If the former, that should never happen. If the latter, it should not
happen either, assuming you are actually maximizing the frame, as opposed
to setting the bounds for the frame to the bounds of the display.
You can maximize the frame with the following line of code:
frame.setExtendedState( Frame.MAXIMIZED_BOTH );
This works on JDK 1.4 and later.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: maximise swing application window hides windows taskbar
Author: David Bolsover
Date: Sat, 09 Oct 2004 11:18
Date: Sat, 09 Oct 2004 11:18
62 lines
2648 bytes
2648 bytes
David Many thanks for the info... I changed the LandF from: UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); to: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); .. this has solved the problem for now -- just means I'm stuck with the naff M$ LandF until I explore some options. David "David C. Browne" <hyperfatigued-removethispart@comcast.net> wrote in message news:41671188$1@newsgroups.borland.com... >I seem to only have this problem using the default or other Metal-based >PLAFs and using JFrame decorations: > > JFrame.setDefaultLookAndFeelDecorated(true); > > Not using JFrame decorations or switching to the Windows or Motif look and > feel should prevent the taskbar hiding. Note that setting the look and > feel decorations to false for a particular instance of a JFrame won't > solve the problem. > > JFrame.setDefaultLookAndFeelDecorated(true); > JFrame f = new JFrame(); > f.setDefaultLookAndFeelDecorated(false); > // maximize still hides taskbar > > > If you aren't using decorations, then I have no idea what your problem may > be. > > For reference, my setup: > > Microsoft Windows XP [Version 5.1.2600] (SP2) > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04) > Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode) > > Hope this helps, > David Browne > > > David Bolsover wrote: >> Hi all >> >> Using a JFrame for an application window - when maximised this hides the >> M$ taskbar - how do I prevent this? >> >> Any assitance would be helpful. >> >> Thanks >> >> David Bolsover
Re: maximise swing application window hides windows taskbar
Author: David Bolsover
Date: Sat, 09 Oct 2004 11:22
Date: Sat, 09 Oct 2004 11:22
39 lines
2245 bytes
2245 bytes
John Thanks for the reply.. Problem is when I use the system maximize button on the JFrame. David Browne has shown the way in his reply to the original post .. looks like a bug in UIManager.getCrossPlatformLookAndFeelClassName() db "John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message news:41679a62@newsgroups.borland.com... > On 10/8/2004 at 2:32:34 PM, David Bolsover wrote: > >> Using a JFrame for an application window - when maximised this hides the >> M$ taskbar - how do I prevent this? > > Is it filling the display when you use the system maximize button on the > JFrame? Or are you trying to maximize the JFrame programmatically? > > If the former, that should never happen. If the latter, it should not > happen either, assuming you are actually maximizing the frame, as opposed > to setting the bounds for the frame to the bounds of the display. > > You can maximize the frame with the following line of code: > > frame.setExtendedState( Frame.MAXIMIZED_BOTH ); > > This works on JDK 1.4 and later. > > -- > Regards, > > John McGrath [TeamB] > > --------------------------------------------------- > Before sending me e-mail, please read: > http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: maximise swing application window hides windows taskbar
Author: John McGrath [TeamB]
Date: Sun, 10 Oct 2004 04:08
Date: Sun, 10 Oct 2004 04:08
31 lines
2127 bytes
2127 bytes
On 10/9/2004 at 7:22:28 AM, David Bolsover wrote:
> looks like a bug in UIManager.getCrossPlatformLookAndFeelClassName()
It does look like a bug, but not in
getCrossPlatformLookAndFeelClassName(). That just returns the name of the
cross-platform look-and-feel class, which is the string
"javax.swing.plaf.metal.MetalLookAndFeel".
The problem is not related to the Metal look-and-feel, or for that matter,
to any look-and-feel. When the Frame is set to Undecorated, the window
takes up the entire screen when it is maximized.
It is affected by calling JFrame.setDefaultLookAndFeelDecorated(true), but
that is just a convenience method that asks the look-and-feel to provide
decorations and also sets the Frame to undecorated(), assuming that the
look-and-feel can provide the decorations.
You can find more information on the problem here, including a workaround
for the problem:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4737788
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: maximise swing application window hides windows taskbar
Author: John McGrath [TeamB]
Date: Thu, 14 Oct 2004 07:03
Date: Thu, 14 Oct 2004 07:03
18 lines
1618 bytes
1618 bytes
On 10/13/2004 at 2:49:16 PM, David Bolsover wrote:
> Thanks for the link.. yes it solves the problem - I have not made
> any checks on speed - but the decorated frame redraw does seen to
> be slower.
I presume you are talking about the PFrame class that was posted there.
It seems rather strange that it would affect repaint speed, since none
of the overridden methods have anything to do with repainting.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads