private String[] getResolutions(DisplayMode[] modes, int heightLimit, int widthLimit) {
        Insets insets = getInsets();
        heightLimit -= insets.top + insets.bottom;
        widthLimit -= insets.left + insets.right;

        Set<String> resolutions = new LinkedHashSet<>(modes.length);
        for (DisplayMode mode : modes) {
            int height = mode.getHeight();
            int width = mode.getWidth();
            if (width >= minWidth && height >= minHeight) {
                if (height >= heightLimit) {
                    height = heightLimit;
                }
                if (width >= widthLimit) {
                    width = widthLimit;
                }

                String res = width + " x " + height;
                resolutions.add(res);
            }
        }

        return resolutions.toArray(new String[0]);
    }
Returns every unique resolution from an array of
<code>DisplayMode</code>s where the resolution is greater than the
configured minimums.
jme3-awt-dialogs/src/main/java/com/jme3/awt/AWTSettingsDialog.java