start program with MAXIMIZED_BOTH

Discussion in 'Java' started by Peter, May 2, 2004.

  1. Peter

    Peter Guest

    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
    Peter, May 2, 2004
    #1
    1. Advertising

  2. 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
    Andrew Thompson, May 3, 2004
    #2
    1. Advertising

  3. 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?


    Call setExtendedState() before calling setVisible() or show().
    HTH,
    Michiel
    Michiel Konstapel, May 8, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lucas Tam
    Replies:
    0
    Views:
    486
    Lucas Tam
    Jun 17, 2005
  2. Anup
    Replies:
    1
    Views:
    2,756
    Mark Rae
    May 9, 2006
  3. Noam Raphael
    Replies:
    17
    Views:
    502
    Noam Raphael
    May 26, 2004
  4. Jon Davis
    Replies:
    0
    Views:
    815
    Jon Davis
    Nov 14, 2006
  5. Ravi

    start join start

    Ravi, Mar 6, 2007, in forum: Java
    Replies:
    4
    Views:
    298
    Patricia Shanahan
    Mar 7, 2007
Loading...

Share This Page