Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Java Example Java Awt TextField

Related Tutorials


 
 

Share on Google+Share on Google+

TextField

Advertisement
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.

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: March 13, 2008

Related Tutorials

Discuss: TextField   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:3
ericson
October 7, 2011
case study jtextfield

i want to know case study of jtextfield..
sadhana mishra
February 21, 2012
how to makes a project with the help of java

nice idea for help in studying...................
savina
February 24, 2012
java

i want to learn frames in java...
DMCA.com