开发者

JFrame Default size on ubuntu

开发者 https://www.devze.com 2023-03-31 02:02 出处:网络
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 (spe

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):

  1. Open System->Preferences->Startup-Apps
  2. Find the entry for 'Maximus' and uncheck it
  3. Logout/login
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号