Results 1 to 4 of 4
  1. #1
    RhysBradbury is offline Member
    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    Default Swing JFrame Maximise Bug?

    I am currently making a little app which will have a dedicated vdu and machine.

    Hence I want to maximize the JFrame to the absolute size of the vdu.

    I am currently extending JFrame.

    i am using this code for the default settings:
    Java Code:
    this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    this.setSize(Toolkit.getDefaultToolkit().getScreenSize());
    this.setUndecorated(true);
    this.setVisible(true);
    I am currently receiving some strange behaviour as all i can see is the bg color of the frame - when i remove the undecorated its still like this, but when i move the window or 'remaximize ' the window, it all loads and you can see the Jframe.

    Can anyone suggest why this is happening and how can i solve this problem??

    Thank you in advance,

    Rhys Bradbury

  2. #2
    RhysBradbury is offline Member
    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    Default Re: Swing JFrame Maximise Bug?

    solved

  3. #3
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    729
    Rep Power
    2

    Default Re: Swing JFrame Maximise Bug?

    Be a good poster and post the solution for the coders that might Google upon your post.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Swing JFrame Maximise Bug?

    :yawn: It's clearly the usual blunder of populating the frame after setting it visible.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. help run java swing (jFrame)
    By azhar21 in forum AWT / Swing
    Replies: 1
    Last Post: 05-14-2012, 07:34 PM
  2. Adding Swing JFrame form to an applet
    By diamonddragon in forum Java Applets
    Replies: 2
    Last Post: 02-06-2012, 06:18 AM
  3. how to know when jframe swing is painted
    By petmoreno in forum AWT / Swing
    Replies: 1
    Last Post: 11-02-2010, 07:06 PM
  4. Replies: 5
    Last Post: 06-14-2010, 06:10 PM
  5. JFrame/Swing Question
    By Moncleared in forum AWT / Swing
    Replies: 9
    Last Post: 01-16-2009, 08:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •