how to create a text box using awt

Ads
 

how to create a text box using awt

give an example how creat multi buttons & text boxes

View Answers

March 16, 2011 at 11:18 AM

import java.awt.*;
class AWTExample 
{
    public static void main(String[] args) 
    {
        Frame f=new Frame();
        f.setLayout(null);
        Label lab=new Label("Name: ");
        TextField text=new TextField(20);
        Button b1=new Button("Add");
        Button b2=new Button("Edit");
        Button b3=new Button("Delete");
        Button b4=new Button("Search");

        lab.setBounds(50,50,80,20);
        text.setBounds(140,50,250,20);
        b1.setBounds(50,100,80,20);
        b2.setBounds(150,100,80,20);
        b3.setBounds(250,100,80,20);
        b4.setBounds(350,100,80,20);
        f.add(lab);
        f.add(text);
        f.add(b1);
        f.add(b2);
        f.add(b3);
        f.add(b4);
        f.setVisible(true);
        f.setSize(500,150);
    }
}

Ads









Related Tutorials/Questions & Answers:
how to create a text box using awt
how to create a text box using awt  give an example how creat multi buttons & text boxes
J2ME Text Box Example
J2ME Text Box Example       This application illustrates how to create the text box using TextBox class. The TextBox class is a Screen that allows the user to enter and edit text
Advertisements
How to Validate dynamically created text box in HTML using Javascript
How to Validate dynamically created text box in HTML using Javascript  Here is the HTML code to create text boxes dynamically. It works properly.... And also how to validate the text boxes created dynamically. <html>
how to display data from mysql table in text box using jsp??
how to display data from mysql table in text box using jsp??  <...="row">Reference GPC</th> 113: <td><input type="text" name...; 115: <th>Numint</th> 116: <td><input type="text
how to print all colors using awt
how to print all colors using awt  how to print all colors using awt
How to handle the text using Key Listener Interface
How to handle the text using Key Listener Interface... to handle the text using the key events on the Java Awt component. All the key events... are going to show you how to display the text of textField1 on the text field2 on key
create, edit ,open simple documents using java - Swing AWT
create, edit ,open simple documents using java   In my program I have a text area.How to create document which will contain text in text... in text area? Then how to transfer text in that document back to text area
List the names of classes used to create button and text box in Java.
List the names of classes used to create button and text box in Java.  List the names of classes used to create button and text box in Java
how to create a combo box in html
how to create a combo box in html  <tr> <td>Number<span class=mandatory>*</span></td> <td> <select name="number" id="course" style="width:158px;"> <option value="none">----Select
populating text box using jsp code
populating text box using jsp code  Sir, How to populate related values in a text box after selecting value from drop down list using JSP and mysql. I tried using Ajax from your example. But for some browser it does not support
how to create using jsp
how to create using jsp  code 1: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>...;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
how to implements jdbc connections using awt?
how to implements jdbc connections using awt?   My name is Aditya... information about how to implements jdbc connections in awt.please give me sample example awt with jdbc.   We are proving you a simple application
how to implements jdbc connections using awt
how to implements jdbc connections using awt  sir, My name... valuable information about how to implements jdbc connections in awt.please give me sample example awt with jdbc. Thanking you sir.  
How to assign a default value to text box in netbeans
How to assign a default value to text box in netbeans  I have a java application,and i want to assign a default variable to the textbox
how to display webservice response in a text box
how to display webservice response in a text box  Hallo, i have created a webservice and when i sended request to my webservice its sending proper response . the point is how to dispaly the response values in a text box usinj
JDialog to create a customized dialog box for entering text data
JDialog to create a customized dialog box for entering text data   Hello sir I wanted to know the code to generate a JDialog to create a customized dialog box for entering text data. The dialog can be split into panes, left pane
Create a Container in Java awt
Create a Container in Java awt       Introduction This program illustrates you how to create... the position of the text area has been specified the center of the frame using
How to Create Instance using PHP
How to Create Instance using PHP  Hi, How to create an instance class in PHP program. Can someone explain or suggest any online reference how to create an Instance class in PHP. Thanks
select box and text box validations
select box and text box validations  hi, any one please tell me how to set validations for select box and text boxes using bean classes? thank you...-registration-form-using-jsp.shtml
how to operate on select box using ajax in struts2?
how to operate on select box using ajax in struts2?  I am doing a project on struts2 in which i have a jsp page which has two select boxes like... box. so please help me..its urgent ... thanx in advance
Insert value of dynamic generated text box in jsp using javascript
Insert value of dynamic generated text box in jsp using javascript  hello sir , i want to generate dynamic text box at run time and i did that using... that dynamically generated text box value into database at a time without
how can i store text box values as it is in database table
how can i store text box values as it is in database table  CUSTOMER DESCRIPTION
another frame by using awt or swings
another frame by using awt or swings  how to connect one frame to another frame by using awt or swings
How to put the logo in login form using swings/awt?
How to put the logo in login form using swings/awt?  Hi, How to put the logo in login form using swings/awt? I write the login form is working but i want to put the logo in login form plz help   Here is an example
how to operate on select box using ajax in struts2?
how to operate on select box using ajax in struts2?  I am doing a project on struts2 in which i have a jsp page which has two select boxes like <... it by assigning to the block list select box. so please help me..its urgent
how to create exce sheet using java
how to create exce sheet using java  how to create excel sheet using java
how to create an excel file using java
how to create an excel file using java  how to create an excel file using java
How to create primary key using hibernate?
How to create primary key using hibernate?  Hi, How to create primary key using hibernate? Thanks
how to create users in LDAP using java?
how to create users in LDAP using java?  how to create users in LDAP using java
create login page using data from text file
create login page using data from text file  I want to create login page using data store in textfile(data submit from regiter page to textfile) using jsp and servlet. Thanks
how to create a header in jtable using java swing
how to create a header in jtable using java swing  how to create a header in jtable using java swing   d

Ads