Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > start program with MAXIMIZED_BOTH

Reply
Thread Tools

start program with MAXIMIZED_BOTH

 
 
Peter
Guest
Posts: n/a
 
      05-02-2004
I want to start a program with MAXIMIZED_BOTH, so that the taskbar is still
visible. i did it like this:

MainFrame a=new MainFrame(new Universe(),100,100);
a.setExtendedState(Frame.MAXIMIZED_BOTH);

now i do not want, that first i see a smaller (or any other not correct
sized) window and than it comes in the right size; it should happen
immediately. how can i do this?

thanks for help


 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      05-03-2004
On Sun, 2 May 2004 23:49:39 +0100, Peter wrote:

> I want to start a program with MAXIMIZED_BOTH, so that the taskbar is still
> visible. i did it like this:
>
> MainFrame a=new MainFrame(new Universe(),100,100);
> a.setExtendedState(Frame.MAXIMIZED_BOTH);
>
> now i do not want, that first i see a smaller (or any other not correct
> sized) window and than it comes in the right size; it should happen
> immediately. how can i do this?


The problem is probably in the code
of MainFrame, the code you did not
supply. My crystal ball is telling
me you either setVisible(true) or
show() inside the constructor.

Maybe if you put the call to
setExtendedState before that, it
will work as you want. If not..
<http://www.physci.org/codes/sscce.jsp>

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Michiel Konstapel
Guest
Posts: n/a
 
      05-08-2004
On Sun, 2 May 2004 23:49:39 +0100, Peter <(E-Mail Removed)> wrote:

> I want to start a program with MAXIMIZED_BOTH, so that the taskbar is
> still
> visible. i did it like this:
>
> MainFrame a=new MainFrame(new Universe(),100,100);
> a.setExtendedState(Frame.MAXIMIZED_BOTH);
>
> now i do not want, that first i see a smaller (or any other not correct
> sized) window and than it comes in the right size; it should happen
> immediately. how can i do this?


Call setExtendedState() before calling setVisible() or show().
HTH,
Michiel
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Start URL with project Start Page (Visual Studio) Jon Davis ASP .Net 0 11-14-2006 08:23 PM
Start Web services as Windows Services start Anup ASP .Net 1 05-09-2006 11:44 AM
My mouse Hangs when I start my computer and then start Firefox booddhhoo Computer Support 3 03-12-2006 05:38 PM
PROCESS.START Help - Need to start app that listens on a port Lucas Tam ASP .Net 0 06-17-2005 02:09 PM
Specify start and length, beside start and end, in slices Noam Raphael Python 17 05-26-2004 09:30 PM



Advertisments