Re: JDialogs used with a Window



Almost forgot the Main that gets the ball rolling:

package javarisk;

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

/**
* Main executable for game.
* @author Stephen Dahlke
*/
public class Main {
/**
* Main program window; Launches into fullscreen
*/
public Main() {
GameWindow gameWindow = new GameWindow(new JFrame("Java
Risk"));
if (gd.isFullScreenSupported()) {
try {
gd.setFullScreenWindow(gameWindow);
} catch (Exception e) {}
}
}
/**
* Executes the program
*/
public static void main(String[] args) {
new Main();
}
private static GraphicsDevice gd =
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
}

.



Relevant Pages

  • Re: Problem in using threads
    ... But my thread that I create Executes only once. ... public class Main extends Frame implements Runnable, ActionListener ... catch (Exception e) ... public static void main ...
    (comp.lang.java.help)
  • Problem in using threads
    ... I am writing a class that implements Runnable interface to use ... But my thread that I create Executes only once. ... public static void main ...
    (comp.lang.java.help)