This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Game Development and the fly likes Developing Games In Java chapter 2 example not doing as i would have expected Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Developing Games In Java chapter 2 example not doing as i would have expected" Watch "Developing Games In Java chapter 2 example not doing as i would have expected" New topic
Author

Developing Games In Java chapter 2 example not doing as i would have expected

Neil Cartmell
Ranch Hand

Joined: Feb 13, 2010
Posts: 150
Hi i'm not sure if this is really the right forum but as I see the book "Developing Games in Java" mentioned a lot around here i thought someone might be able to help me.

Here is the code that is in Chapter 2.






Basically it's just to teach you how to have a program be full screen, which is something I have not done before. The only thing that is different to what i expect are the colors of the screen when th program is running. In the run() method of class FullScreenTest is says this...



But the screen color turns out being black. Even if i switch the colors around it makes no difference. Should the color not be white? I know the book is pretty old so is there something else i have to now to change the foreground color?

vinaykumar jg
Greenhorn

Joined: Mar 18, 2011
Posts: 3
Hey dude,

First of all , If your expectation is only on the full screen and the background color let me know. Ill get you another code that does your need.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Developing Games In Java chapter 2 example not doing as i would have expected