JFrame Default size on ubuntu
I use ubuntu 10.04, but have discovered this on other ubuntu distributions as well.
开发者_StackOverflow中文版When I start the first JFrame of an application, it won't start in its default size (specified by setSize()), but instead is maximized all over the screen.
I have one workaround for this, which is to use setResizable(false) (which brings the window to its intended size), then I set it back to true (I still want to be able to resize).
Anybody knows where this bug is from? Is there any elegant way to deal with this?
Thanks,
It is a window manager preference. Either disable it in ubuntu or modify your program live with users wanting to resize your program.
To disable (from ubuntu forum post):
- Open System->Preferences->Startup-Apps
- Find the entry for 'Maximus' and uncheck it
- Logout/login
精彩评论