GUI Objects keep moving
Hello,
I'm a bit new to Java and really new to creating GUI in Java. I've successfully create a frame with a panel with some buttons and a label. The thing is when I use frame.pack() it moves the buttons and label. I've looked in a debugger and there was this list of method's calls:
java.awt.Window.pack -->
java.awt.Container.validate -->
java.awt.Container.validateTree -->
java.awt.Container.validateTree -->
java.awt.Container.validateTree -->
java.awt.Container.validateTree -->
java.awt.Container.validateTree -->
java.awt.Container.doLayout -->
java.awt.Container.layout -->
java.awt.FlowLayout.layoutContainer -->
java.awt.FlowLayout.moveComponents
which finally calls to JButton.setLocation...
Sorry for the the mess made by all these method's calls by I hope it would make sense to any of you.
Also, this happens when changing the label but there is a bit different order of calls, something with java.awt.EventDispatchThread...
Thank you for your help :-)

