Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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 1520 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);
Offline princec

« JGO Spiffy Duke »

Medals: 1033
Projects: 3
Exp: 20 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  

EgonOlsen (58 views)
2018-06-10 19:43:48

EgonOlsen (40 views)
2018-06-10 19:43:44

EgonOlsen (60 views)
2018-06-10 19:43:20

DesertCoockie (225 views)
2018-05-13 18:23:11

nelsongames (141 views)
2018-04-24 18:15:36

nelsongames (140 views)
2018-04-24 18:14:32

ivj94 (882 views)
2018-03-24 14:47:39

ivj94 (143 views)
2018-03-24 14:46:31

ivj94 (794 views)
2018-03-24 14:43:53

Solater (158 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!