every time when I call pack() method on JFrame, it moves to the initial position where was when started. When I try to get the location of the JFrame (getLocation, getLocationOnScreen) it's still the same as initial position no matter I'm moving the window. I am running Archlinux with Awesome WM. Please help.
Thanks Uiii
EDIT: What I just want is to be able to show or hide some components in the main window (which cause layout resizing) without moving the windows to the initial position.
EDIT2: So I just found that Paŭlo (from comment) is right. It works fine in Xfce, but in Awesome WM not.
EDIT3: I really don't understand why are you voting the question down. It's the first time I'm using pack() function, so I don't know what is its correct behavior. There is no explanation in the java API document if the window's position will change. I just use this the first in Awesome WM which I am using as my window manager, so I don't know that should behave another way. I have tried to find something about it on the internet but found nothing. I think that this question can be useful to someone after I've found the solution. There are certainly another java developers who are using Awesome WM (or some similar with the same problem).