util
Class Console

java.lang.Object
  extended by util.Console

public class Console
extends java.lang.Object

From the book: "Thinking in Java" by Bruce Eckel, Prentice Hall, 3rd edition, 2003. He develops his own "wrapper classes" which allow the applet to run standalone or as an applet/servlet. This file implements his framework.


Constructor Summary
Console()
           
 
Method Summary
static void run(javax.swing.JApplet applet, int width, int height)
          Activate the applet the given size.
static void run(javax.swing.JFrame frame, int width, int height)
          Activate the frame the given size.
static void run(javax.swing.JPanel panel, int width, int height)
          Activate the panel the given size.
static java.lang.String title(java.lang.Object obj)
          Create the title string from the class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Console

public Console()
Method Detail

title

public static java.lang.String title(java.lang.Object obj)
Create the title string from the class name.

Parameters:
obj - the object whose class name is to be extracted and returned.
Returns:
the object's class name.

run

public static void run(javax.swing.JFrame frame,
                       int width,
                       int height)
Activate the frame the given size.

Parameters:
frame - the frame to be activated.
width - the window width to use.
height - the window height to use.

run

public static void run(javax.swing.JApplet applet,
                       int width,
                       int height)
Activate the applet the given size.

Parameters:
applet - the applet to be activated.
width - the window width to use.
height - the window height to use.

run

public static void run(javax.swing.JPanel panel,
                       int width,
                       int height)
Activate the panel the given size.

Parameters:
panel - the panel to be activated.
width - the window width to use.
height - the window height to use.