Home Java Example Java Awt TextField



TextField
Posted on: March 13, 2008 at 12:00 AM
A scrollable text display object with one row of characters is known as the TextField. In the example given below, shown a textfield in the applet by creating its textfield.shtml object.

TextField

     

A scrollable text display object with one row of characters is known as the TextField. In the example given below, shown a textfield in the applet by creating its <<<<<<< textfield.shtml object.

 

 

======= object.

>>>>>>> 1.2
import java.awt.*; 
import java.applet.Applet; 
 
public class TextFieldDemo extends Applet{ 
  public void init(){ 
  TextField tf = new TextField("Type in the box"); 
  add(tf); 
  


Here is the output:
 

C:\newprgrm>javac TextFieldDemo.java

C:\newprgrm>appletviewer TextFieldDemo.html

 

Download this example.

Related Tags for TextField:
htmlctextappletobjectapplechardisplayscrollfieldappcharacterrowcharacterstextfieldshowtexieexamplectewithexamldshexteitsplinnomlasmplayletjispshtmlhowobjppcreatingxaxampsspatrackhtmishallivmpleaaracttfxtscrssthshobeloabablatiapdispjepleplonolo


More Tutorials from this section

Ask Questions?    Discuss: TextField   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.