Last active
March 10, 2019 12:21
-
-
Save ezhov-da/d133ae36d7dc70b2533d76a00c2e794a to your computer and use it in GitHub Desktop.
java определяем расположение панели задач
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[code:]java[:code] | |
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); | |
Rectangle rect = ge.getMaximumWindowBounds(); | |
frame.setLocation((int) (rect.getWidth() - frame.getWidth()), | |
(int)(rect.getBounds().getHeight() - frame.getSize().getHeight())); | |
frame.setLocationByPlatform(true); // Вызов обязательно, без него не работает !!! | |
frame.setVisible(true); | |
[/code] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment