Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (710)
Games in Android Showcase (212)
games submitted by our members
Games in WIP (784)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Could not get display mode  (Read 1352 times)
0 Members and 1 Guest are viewing this topic.
Offline dtjavanet

Senior Newbie

Java games rock!

« Posted 2004-06-09 10:13:26 »

To Java Games Users

Embarrassed Sorry to post in this section, but I have only one reply which doesn't work.

I have now started reading David Brackeens book on Developing Games in Java. Excellent Book!!  Smiley

I have tried the second chapter example and I am getting this runtime error.

K:\DGJ\allsrc\ch02src>java FullScreenTest
Java2D Direct3D usage disabled by J2D_D3D env
Exception in thread "main" java.lang.InternalError: Could not get display mode
  at sun.awt.Win32GraphicsDevice.getCurrentDisplayMode(Native Method)
  at sun.awt.Win32GraphicsDevice.getDisplayMode(Unknown Source)
  at java.awt.GraphicsDevice.setFullScreenWindow(Unknown Source)
  at sun.awt.Win32GraphicsDevice.setFullScreenWindow(Unknown Source)
  at SimpleScreenManager.setFullScreen(
  at FullScreenTest.main(

Is this a problem with my video card, do you need video acceleration to do what the code does below.I have the most up to date drivers, is there any other software I should be installing

If someone can help, I have tried and the suggestions, small as they are are of no help.

David Thomson  Smiley

Code is below (Copyright (c) David Brackeen)

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

public class FullScreenTest extends JFrame {

   public static void main(String[] args) {

  DisplayMode displayMode;
  if (args.length == 3) {
 displayMode = new DisplayMode(
  else {
 displayMode = new DisplayMode(800, 600, 16,

  FullScreenTest test = new FullScreenTest();;
   private static final long DEMO_TIME = 5000;

   public void run(DisplayMode displayMode) {
  setFont(new Font("Dialog", 0, 24));

  SimpleScreenManager screen = new SimpleScreenManager();
  try {
 screen.setFullScreen(displayMode, this);
 try {
 catch (InterruptedException ex) { }
  finally {

   public void paint(Graphics g) {
  g.drawString("Hello World!", 20, 50);
Online princec

« JGO Spiffy Duke »

Medals: 892
Projects: 3
Exp: 16 years

Eh? Who? What? ... Me?

« Reply #1 - Posted 2004-06-09 10:37:42 »

It's because that display mode is not supported.
This thread should be moved to Java2D or Newless.

Cas Smiley

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

theagentd (99 views)
2017-02-18 13:42:33

theagentd (103 views)
2017-02-18 13:35:16

h.pernpeintner (1268 views)
2017-01-24 22:39:11

h.pernpeintner (1257 views)
2017-01-24 22:38:32

Galdo (1816 views)
2017-01-12 13:44:09

Archive (1921 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2459 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2298 views)
2016-12-15 21:50:57

Lunch (2377 views)
2016-12-06 16:01:40

ral0r2 (2155 views)
2016-11-23 16:08:26
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!