Results 1 to 3 of 3
  1. #1
    Paprsak is offline Member
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default Problem with GUI applications(Mac)

    Hello!

    Everytime I start a GUI app, all the objects(buttons, labels, everything!) in the window are invisible at start. To make them visible I have to change the size of the window, and when I do that(by "dragging" the edges of the window), all objects just pop up. I want them to be visible at start, so that I can make the window unresizable.
    I have this problem no matter what objects I put into the frame. Worth mentioning is that I'm programming on a mac.
    So, the big question, how can I fix this?

  2. #2
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    Location
    London, UK
    Posts
    797
    Blog Entries
    2
    Rep Power
    4

    Default Re: Problem with GUI applications(Mac)

    See if calling SwingUtilities.updateComponentTreeUI(this) works in your JFrame class, or if you don't have a JFrame class then it would be SwingUtilities.updateComponentTreeUI(myFrame).

    Call it at the end of the initialisation of your frame before you setVisible(true).

  3. #3
    Paprsak is offline Member
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default Re: Problem with GUI applications(Mac)

    Quote Originally Posted by ozzyman View Post
    See if calling SwingUtilities.updateComponentTreeUI(this) works in your JFrame class, or if you don't have a JFrame class then it would be SwingUtilities.updateComponentTreeUI(myFrame).

    Call it at the end of the initialisation of your frame before you setVisible(true).
    Works perfectly, thank you!

Similar Threads

  1. Replies: 4
    Last Post: 03-16-2012, 11:29 AM
  2. applications in netbeans
    By Suni in forum NetBeans
    Replies: 1
    Last Post: 01-03-2011, 05:10 PM
  3. Web applications
    By etisc in forum New To Java
    Replies: 1
    Last Post: 01-02-2011, 03:28 PM
  4. Stand alone applications? HELP!!!
    By Atriamax in forum Eclipse
    Replies: 6
    Last Post: 09-11-2009, 01:56 AM
  5. Including JAR in applications
    By bugger in forum New To Java
    Replies: 0
    Last Post: 01-11-2008, 09:36 AM

Posting Permissions

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