Hi all,
I have an application that needs to run in 800x600 resolution no matter what PC it runs on so I used the following code:
public static void main(String args[]) {
JFrame windo = new pdtester();
windo.setVisible(true);
GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
/**find out if the device we are using is even capable of
*supporting full screen*/
if (device.isFullScreenSupported()) {
DisplayMode display = new DisplayMode(800,600,32,0);
try {
device.setFullScreenWindow(windo);
device.setDisplayMode(display);
} catch (Exception e) {
//exception handling here
}
}
}
it seems to work and the program executes in 800x600 but the problem is the graphics dont seem to refresh and they only show when you scroll over them etc... I assume its something to do with the refresh rate set at zero at present. I've tried 50 and display.REFRESH_RATE_UNKNOWN but I get the same problem.
Any ideas would be appreciated.
Thanks,
John