Get available display modes

Hi

I've removed the basic PropertiesDialog and created my own. My problem now is that I can't find a way to get the available display modes, to choose between. Looking through the source code of PropertiesDialog didn't help, since the author of that class apparently had the same problem

"PropertiesDialog" wrote:

String[] modes = { "640x480", "800x600", "1024x768", "1280x1024", "1600x1200" };
JComboBox resolutionBox = new JComboBox(modes);


I've earlier worked with LWJGL (without jME) where I used:

org.lwjgl.opengl.DisplayMode[] dm = org.lwjgl.opengl.Display.getAvailableDisplayModes();



to get the available display modes. But I can't figure how to do it through jME :(

Can anyone help me??

btw I'm afk for the next few days, so don't worry if I don't reply

Problem solved :slight_smile:



http://www.exampledepot.com/egs/java.awt/screen_GetDispModes.html



In short:

import java.awt.GraphicsEnvironment;
import java.awt.DisplayMode;

...

DisplayMode[] dm = GraphicsEnvironment.getLocalGraphicsEnvironment().
getDefaultScreenDevice().getDisplayModes();

ahhh the The Java Developers Almanac  :smiley: my most used website in my first few years of Java development