Changing screen resolution

Hi Everyone,

I'm quite sure that it is not possible to change the screen resolution from within a running java program. The problem is that my boss won't believe it until he reads it in the spec. Does anyone out there know where to find a anything about it the specs?

Thanks in advance

jan

[330 byte] By [mahlzeit] at [2007-9-26 2:45:32]
# 1

A specification of something is usually specifying what that thing is about. I think it will take you a long time trying to find a specification of what Java is not about.

To answer your question : I have never come across the kind of functionality you are looking for in the API, so I don't think it is possible.

bku1 at 2007-6-29 10:27:28 > top of Java-index,Desktop,Runtime Environment...
# 2

Hi! The screen resolution is a function of the underlying OS and cannot be changed from a Java program, unless one resorts to JNI. However, the screen resolution can be retrieved from a Java program. Look at the docs for the getScreenSize() and getScreenResolution() methods in the java.awt.Toolkit packges. Note that these methods are abstract. The actual implementation depends upon the vendor.

Perhaps you can ask your boss to search the Java docs for methods that allow Java code to change the resolution w/o resorting to JNI. We'll all be glad to know! :-)

Hope this helps!

Cheers!

amolk at 2007-6-29 10:27:28 > top of Java-index,Desktop,Runtime Environment...
# 3
It's perfectly possible to change the resolution using JDK 1.4 beta.
KaptenJava at 2007-6-29 10:27:28 > top of Java-index,Desktop,Runtime Environment...
# 4
the problem with 1.4 beta, is its a beta, and it cant handle freeing memory off the native heap on some platforms, windows 9x for example. Just run a java3d example program for 10 minutes on windows using the 1.4 jre and tell me how many system resources you have left ;)
A Frayed Knot at 2007-6-29 10:27:28 > top of Java-index,Desktop,Runtime Environment...
# 5
OK, off topic, but still interesting. My guess is that they will take care of this in the final release.
KaptenJava at 2007-6-29 10:27:28 > top of Java-index,Desktop,Runtime Environment...
# 6
But I think it might be possible in future versions of java.
cheehwa at 2007-6-29 10:27:28 > top of Java-index,Desktop,Runtime Environment...
# 7
If you're able to read, you might find out that this is actually true. Hint: read my earlier post.
KaptenJava at 2007-6-29 10:27:28 > top of Java-index,Desktop,Runtime Environment...