Instead of the whole window complete with buttons for closing, maximum and minimum, as well as borders?
I am trying to save a screenshot of the client area ... maximizedBounds crashes the application ...
Get the borders of the content area (i.e. JFrame.getContentPane().getBounds() ).
JFrame.getContentPane().getBounds()
This did the trick:
Point pos = this.getContentPane().getLocationOnScreen(); Rectangle clientRect = this.getContentPane().getBounds(); clientRect.x = pos.x; clientRect.y = pos.y;
Source: https://habr.com/ru/post/1369522/More articles:How to check if Dojo / Javascript tree is working, lazy loading? - javascriptClientRect semantics from getClientRects in webkit browsers - javascripttext-rotation - problem with IE - cssCreate facebook tab only for my company page - facebookVB6: How to create a DLL and use it in C #? - c #Cmake on mac os x, full path link libraries - linkerHow to change keys in normal Vim mode, and not just reassign them? - vimHow can you specify the ant build file to recursively add all files to the bin directory in jarfile? - jarHTTP streaming to Heroku with Rails 3.1 and Unicorn - ruby-on-rails-3.1Using Selenium webdriver with firefox user profile - how to get rid of addins pop-ups - pythonAll Articles