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?
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).
Re: Problem with GUI applications(Mac)
Quote:
Originally Posted by
ozzyman
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!