Class myTextField

Class myTextField

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.TextComponent
                   |
                   +----java.awt.TextField
                           |
        Warning: links to the API classes above do not exist.  Only links to the 
        Ponzo classes and the "see also" classes exist. If you choose a link 
        that does not exist, simply hit the right mouse button to return to this frame.
                           |
                           +----myTextField
To Go Back click here.
class myTextField
extends TextField
 This class extends the TextField class.  This is required because the width of this component
   window needs to be a function of the string it displays.  This class over-rides the minimumSize()
   method to specify the size of the display window.
   

Constructor Index

 o myTextField(String, String)
This construction instanciates a TextField object and saves information needed to set the size of the
        display window.

Method Index

 o minimumSize()
 Over-riding the default minimumSize method in order to set my own size.

Constructors

 o myTextField
  public myTextField(String dv,
                     String t)
This construction instanciates a TextField object and saves information needed to set the size of the
        display window.
Parameters:
dv - is the text to be displayed in the display window.
t - is the string used to determine the size of the display window.

Methods

 o minimumSize
  public Dimension minimumSize()
 Over-riding the default minimumSize method in order to set my own size.  Specifically,
      the width of the testString is determined via the the FontMetrics class, as well as it's
      height.  The layout manager will call this when it places the TextField.
Parameters:
null - no parameters
Returns:
Dimension is the size in pixels of the display window.
Overrides:
minimumSize in class TextField