Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

InternalError when trying to get display mode

2 views
Skip to first unread message

Karsten Wutzke

unread,
Jul 3, 2002, 6:49:05 PM7/3/02
to
Hi all!

When trying to get the display mode on my machine I always get an
InternalError from a native method:

java.lang.InternalError: Could not get display mode
at sun.awt.Win32GraphicsDevice.getCurrentDisplayMode(Native Method)
at sun.awt.Win32GraphicsDevice.getDisplayMode(Win32GraphicsDevice.java:285)
at GraphicsEnv.main(GraphicsEnv.java:27)


I'm not sure whose fault it is, that is the driver manufacturer or Sun...

Here's a simple test program I have compiled:


import java.awt.*;
import javax.swing.*;

public class SimpleGraphicsEnv
{
public static void main(String args[])
{
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gds = ge.getScreenDevices();

System.out.println("Number of screen devices:" + gds.length);

for ( int j = 0; j < gds.length; j++ )
{
//get device
GraphicsDevice gd = gds[j];
System.out.println("[" + j + "]: " + gd);

//get current display mode
DisplayMode currdm = gd.getDisplayMode();
System.out.println("Current display mode:" + currdm);
}
}

}


Either it is a problem with the driver of my graphice card or it is a
problem with Sun's implementation. I can only find out with your help!

I would highly appreciate, if you could test this simple program on your
machine and tell me about your experiences.

Is there anything I'm missing?

TIA
Karsten

0 new messages