Skip to main content

Posts

Showing posts from October, 2016

Example of textarea in java

       find the length of the text in textarea import java.awt.*; import java.awt.event.*; import java.applet.*; /*             <applet code="TextArea1" height=200 width=200>             </applet> */ public class TextArea1 extends Applet implements ActionListener {             TextArea ta;             TextField tsp,tep,tlen; public void init()             {                         Label l1=new Label("Enter the text                    ...

TEXTAREA

           TEXTAREA CLASS IN AWT TextArea class:             This class is used to create the text area where we want type the text  extending to the multiple             rows and columns. Constructors: (i) TextArea()  It is the default constructor of the TextArea class.                         The general form is,                                     TextArea objectname =new TextArea(); (ii) TextArea(String)   It is used to create a textarea and assign in it the default string.              ...

Example of Textfiled in java

     Another example of textfield  using array and                        show data after search import java.applet.*; import java.awt.*; import java.awt.event.*; /*             <applet code="Search" height=200 width=200>             </applet> */ public class Search extends Applet implements ActionListener {             String ename[ ]={"ajay","kapil","sanjay","lalit","manoj"};             String eid[ ]={"e001","e101","e900","e890","e299"};             int salary[ ]={10023,8900,8299,9000,7899};             TextField txtid,txtname,txtsal; ...

Textfield example for addition in java

                  Program of addition in awt (Textfield) PROGRAM- import java.applet.*; import java.awt.*; import java.awt.event.*; /*             <applet code="Calculate" height=200 width=200>             </applet> */ public class Calculate extends Applet implements ActionListener {             TextField txta,txtb,txtc;             Button b1,b2;             public void init()             {                         Label l1=new Label("Enter the value of a ...

TEXTFIELD example in java

                   TEXTFIELD class example in java import java.applet.*; import java.awt.*; import java.awt.event.*; /* <applet code="TextDemo1" height=200 width=200> </applet> */ public class TextDemo1 extends Applet implements ActionListener {             TextField tf;             Button b1,b2;             public void init()             {                         tf=new TextField(20);                         add(tf);      ...