Java get Taskbar height

    public static int getTaskbarHeight(Component comp) {
        int heightOfTaskbar = 0;
        try {
            Insets scnMax = Toolkit.getDefaultToolkit().getScreenInsets(comp.getGraphicsConfiguration());
            heightOfTaskbar = scnMax.bottom;
        } catch (Exception e) {

        }
        return heightOfTaskbar;
    }

No comments:

Post a Comment