public enum Location {
    TOP, RIGHT, BOTTOM, LEFT;
}
private static final class Taskbar {
    public final Location location;
    public final int width, height;
    private Taskbar(Location location, int width, int height) {
        this.location = location;
        this.width = width;
        this.height = height;
    }
    public static Taskbar getTaskbar() {
        Rectangle other = GraphicsEnvironment.getLocalGraphicsEnvironment()
                .getMaximumWindowBounds();
        return new Taskbar(other.x != 0 ? Location.TOP
                : (other.y != 0 ? Location.LEFT
                        : (other.width == IFrame.width ? Location.BOTTOM
                                : Location.RIGHT)), IFrame.width
                - other.width, IFrame.height - other.height);
    }
}