private static String[] getDepths(String resolution, DisplayMode[] modes) {
        List<String> depths = new ArrayList<>(4);
        for (DisplayMode mode : modes) {
            int bitDepth = mode.getBitDepth();
            if (bitDepth == DisplayMode.BIT_DEPTH_MULTI) {
                continue;
            }
            // Filter out all bit depths lower than 16 - Java incorrectly
            // reports
            // them as valid depths though the monitor does not support them
            if (bitDepth < 16 && bitDepth > 0) {
                continue;
            }
            String res = mode.getWidth() + " x " + mode.getHeight();
            if (!res.equals(resolution)) {
                continue;
            }
            String depth = bitDepth + " bpp";
            if (!depths.contains(depth)) {
                depths.add(depth);
            }
        }

        if (depths.isEmpty()) {
            // add some default depths, possible system is multi-depth
            // supporting
            depths.add("24 bpp");
        }

        return depths.toArray(new String[0]);
    }
Returns every possible bit depth for the given resolution.
jme3-awt-dialogs/src/main/java/com/jme3/awt/AWTSettingsDialog.java