javabook
Class JavaBookDialog

java.lang.Object
  extended byjavabook.JavaBookDialog
Direct Known Subclasses:
InputBox, ListBox, MessageBox, MultiInputBox, ResponseBox

public abstract class JavaBookDialog
extends java.lang.Object

This abstract class defines behavior and data members common to javabook dialogs such as MessageBox, InputBox, and others. You can use this class as the superclass of your own dialog box. In this Swing version of javabook, the JOptionPane class is used extensively. Many functionalities coded inside the original javabook package are now handled automatically by the JOptionPane class.

This class is provided as freeware. You are free to use as provided or modify to your heart's content. But you use it at your own risk. No implied or explicit warranty is given.


Field Summary
static int ERROR_ICON
          Constant for the error icon
static int INFO_ICON
          Constant for the information icon
static int NO_ICON
          Constant for no icon
static int QUESTION_ICON
          Constant for the question icon
static int WARNING_ICON
          Constant for the warning icon
 
Constructor Summary
JavaBookDialog(java.awt.Component owner)
           
JavaBookDialog(java.awt.Component owner, boolean modal)
           
 
Method Summary
 void setIcon(int icon)
          Sets the icon of this dialog
 void setLocation(int x, int y)
          Sets the location of this dialog.
 void setTitle(java.lang.String title)
          Sets the title of this dialog
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_ICON

public static final int NO_ICON
Constant for no icon

See Also:
Constant Field Values

INFO_ICON

public static final int INFO_ICON
Constant for the information icon

See Also:
Constant Field Values

ERROR_ICON

public static final int ERROR_ICON
Constant for the error icon

See Also:
Constant Field Values

WARNING_ICON

public static final int WARNING_ICON
Constant for the warning icon

See Also:
Constant Field Values

QUESTION_ICON

public static final int QUESTION_ICON
Constant for the question icon

See Also:
Constant Field Values
Constructor Detail

JavaBookDialog

public JavaBookDialog(java.awt.Component owner)

JavaBookDialog

public JavaBookDialog(java.awt.Component owner,
                      boolean modal)
Method Detail

setIcon

public void setIcon(int icon)
Sets the icon of this dialog

Parameters:
icon - an icon to display on this dialog

setLocation

public void setLocation(int x,
                        int y)
Sets the location of this dialog.

Parameters:
x - the x coordinate of this dialog's origin relative to the screen
y - the y coordinate of this dialog's origin relative to the screen

setTitle

public void setTitle(java.lang.String title)
Sets the title of this dialog

Parameters:
title - a new title for this dialog