Java JFrame setFrameBottomRight(final JFrame frame)

Here you can find the source of setFrameBottomRight(final JFrame frame)

Description

set Frame Bottom Right

License

LGPL

Declaration

public static void setFrameBottomRight(final JFrame frame) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import javax.swing.*;
import java.awt.*;

public class Main {
    public static void setFrameBottomRight(final JFrame frame) {
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice defaultScreen = ge.getDefaultScreenDevice();
        Rectangle rect = defaultScreen.getDefaultConfiguration().getBounds();
        int x = (int) rect.getMaxX() - frame.getWidth();
        int y = (int) rect.getMaxY() - frame.getHeight();
        frame.setLocation(x, y);//from   ww  w .java  2  s .  c  o  m
    }
}

Related

  1. setDialogLocation(JFrame frame, JFrame parentFrame)
  2. setDirty(JFrame frame, boolean isDirty)
  3. setEscapeAction(JFrame frame, Action action)
  4. setEscapeClosable(JFrame frame)
  5. setESCCloseable(final JFrame aFrame)
  6. setFramePositon(JFrame inTargetFrame)
  7. setFrameTitle(JFrame frame, File file)
  8. setGeneralParameters(final JFrame window)
  9. setInfo(String info, JFrame root)