JFrame default size on ubuntu

I am using ubuntu 10.04, but found this in other ubuntu distributions as well.

When I launch the first application JFrame, it will not start with the default size (setSize ()), but instead it will maximize across the screen.

I have one workaround for this, which is to use setResizable (false) (which brings the window to its intended size), then I returned it to true (I still want to resize).

Does anyone know where this error came from? Is there an elegant way to handle this?

Thanks,

+4
source share
1 answer

This is the preference of the window manager. Either disable it in ubuntu, or change your program in real time with users who want to resize your program.

Disable (from ubuntu forum post) :

  • Open System-> Preferences-> Startup-Apps
  • Find the entry for "Maximus" and uncheck
  • Logout / Login
+5
source

Source: https://habr.com/ru/post/1369366/


All Articles