Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ezhov-da/d133ae36d7dc70b2533d76a00c2e794a to your computer and use it in GitHub Desktop.
Save ezhov-da/d133ae36d7dc70b2533d76a00c2e794a to your computer and use it in GitHub Desktop.
java определяем расположение панели задач
[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