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

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
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>
Advertisements
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
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
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
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
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 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
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
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  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 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
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
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
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
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
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
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 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
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
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
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
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 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
Create Box in Excel Sheet Using JSP
create box in excel sheet using jsp       In this program we are going create... that we create textbox and at last we set string into created box.   
How to Create Text Area In Java
How to Create Text Area In Java       In this section, you will learn how to create Text Area in Java... and a text area is also created on the panel by using JTextArea class
how to backup and restore database using java - Swing AWT
how to backup and restore database using java  sir my project is to backup and restore my datas using java so i want to know how to backup and restore databases using java give ur ideas and suggestions to me immediately  
Text box Checking
Text box Checking  I want to Write only the word A-Z in a text box What is the code
How to check text in textbox using JavaScript
How to check text in textbox using JavaScript  How to check text in textbox using JavaScript I have a form in HTML that contains text feilds... qestion is that is it possible to check text feilds for text or null value. I want
How to populate text fields using php code?
How to populate text fields using php code?  How could I use php to populate text fields by selecting a name of a business from dropdown list? Those text fields that will be populated by information in regards its company name
add text box and select list dynamically and get its value to store it into database using jsp request parameter
add text box and select list dynamically and get its value to store it into database using jsp request parameter  its very helpful when you have only dynamically added text field but want code to retrive value of dynamically
How to set the border in header and footer from login page using swings/awt
How to set the border in header and footer from login page using swings/awt  Hi, How to set the border in header and footer from login page using swings/awt
program to create student report using java applet,read the input using text boxesand generate the grades..?
program to create student report using java applet,read the input using text boxesand generate the grades..?   sir plz give me java applet codes for above question
Drag a Text Box into dynamic positions
Drag a Text Box into dynamic positions  Plz can anyone tell how can i drag a text box using mouse or arrow keys... Im doing a accounts projects and i need this feature for cheque configuration
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
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
how to create pdf file using java and itextjar
how to create pdf file using java and itextjar  How to create pdf file having paragraphs and alignments done using java and itextjar 5.10 version.? hope i get quick response
how to create pdf file using java and itextjar
how to create pdf file using java and itextjar  How to create pdf file having paragraphs and alignments done using java and itextjar 5.10 version.? hope i get quick response
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using combo box value in jsp?  Hi Friends... in combo box from database.. by using select*from studentinformation; But when i... related value.... I am using only this page.. not get value from another page
How to create bar chart using database values
How to create bar chart using database values  How to create bar chart using database values i.e excellent,good,average fields using jsp?It is like opinion poll.I want to show how many votes are came for excellent,good,average
how to create a zip by using byte array
how to create a zip by using byte array  hi, How to convert byte array to zip by using java program.can u plz provide it...... Thanks, krishna
how to create this structure in json using grails
how to create this structure in json using grails  { "query": { "type": "cluster", "view": "accountActivity", "regions": [2342,334,241,13], "companies": [43228583,433421683,342427783], "departments": [1,2,4,6], "brands
How to Create Quiz Application using iPhone
How to Create Quiz Application using iPhone  Hi, I am learning iphone application Programming Language. my question is that how to create a quiz.... The below link have given step by step process of how to create quiz
how to create database and table using jsp
how to create database and table using jsp  hi frnds...., i want to create database and table in mysql using jsp.... i have an registration form(name... for each user to store their details.. so pls help me how to create individual
How to create web application using maven in Eclipse?
How to create web application using maven in Eclipse?  I have to create the web project in Maven using the Eclipse IDE. Since Eclipse is very useful.... Now want to use the Maven in the Eclipse. I don'w know how to create web

Ads