Dimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();
Insets scrInsets = Toolkit.getDefaultToolkit().getScreenInsets(
GraphicsEnvironment.getLocalGraphicsEnvironment()
.getDefaultScreenDevice().getDefaultConfiguration());
this.setBounds(scrInsets.left, scrInsets.top, scrSize.width
- scrInsets.left - scrInsets.right, scrSize.height
- scrInsets.top - scrInsets.bottom);
Insets scrInsets = Toolkit.getDefaultToolkit().getScreenInsets(
GraphicsEnvironment.getLocalGraphicsEnvironment()
.getDefaultScreenDevice().getDefaultConfiguration());
this.setBounds(scrInsets.left, scrInsets.top, scrSize.width
- scrInsets.left - scrInsets.right, scrSize.height
- scrInsets.top - scrInsets.bottom);