Class corejava.IntTextField
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class corejava.IntTextField

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.TextComponent
                   |
                   +----java.awt.TextField
                           |
                           +----corejava.IntTextField

public class IntTextField
extends TextField

Constructor Index

 o IntTextField(int, int, int, int)
Creates the text field

Method Index

 o getValue()
Get the integer data value
 o isValid()
Checks if the data entered is valid or not

Constructors

 o IntTextField
  public IntTextField(int def,
                      int min,
                      int max,
                      int size)
Creates the text field
Parameters:
def - an integer default,
min - the minimum int accepted
max - the maximum int accepted
size - the size of the text field

Methods

 o isValid
  public boolean isValid()
Checks if the data entered is valid or not
Returns:
true data ok, false otherwise
Overrides:
isValid in class Component
 o getValue
  public int getValue()
Get the integer data value
Returns:
the integer data value

All Packages  Class Hierarchy  This Package  Previous  Next  Index