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);
    }
}









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
create text box by clicking button and submittong text in text box using submit
create text box by clicking button and submittong text in text box using... is created. and i want to do that when i enter the text input in text box and when i... box in SOP). i also want the text box should generate in front of NEW button
Advertisements
How to get data from DB in to Text box by using Jsp & Ajax
How to get data from DB in to Text box by using Jsp & Ajax   I want to get the data from database in to text box in a jsp page by using Ajax. If I enter the letter A in the textbox it should show only those values which starts
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 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 create an input box?
How to create an input box?  How to create an input box
How to create a confirmation box?
How to create a confirmation box?  How to create a confirmation box
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
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
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
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 create Combo Box in SWT
How to create Combo Box in SWT       This section illustrates you how to create a combo box... are added to the  first combo box by using the method add() of Combo class. 
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
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 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 print all colors using awt
how to print all colors using awt  how to print all colors using awt
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">
Display current date in text box in JSP using javascript
Display current date in text box in JSP using javascript In this section you will learn how to display current date in text box using JavaScript.For...();"> Today's Date is: <input type="text" id="datetext"
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
How to create a Java Runtime Editor - Swing AWT
How to create a Java Runtime Editor   Hi, I am working... using java swing, try the following code: import java.awt.BorderLayout... want to generate an editor using java swing, try the following code: import
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.  
Is it any code available for auto suggest text box using do? - Development process
Is it any code available for auto suggest text box using do?  In dojo, we are having combo box, in which auto suggestion already implemented. Like that is it we have auto suggestion for text box
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
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 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
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.   
two text box problem
two text box problem  i have two text box in two different pages and same variable use in two text box when enter value in first text box it's reflection show in second text box , how i reduce it in jsf ?   Hi Friend
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
auto complete text box - Ajax
auto complete text box  How to create auto complete text box in jsp using ajax technology ? plz giv me steps wise code
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, (adsbygoogle
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using combo box value in jsp?  For example, In Employee.jsp form, When i click employee id value in combo box ,the related employee name will be displayed in text field
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
Text box Checking
Text box Checking  I want to Write only the word A-Z in a text box What is the code
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 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 Text Area In Java
How to Create Text Area In Java       In this section, you will learn how to create Text Area in Java... are created and a text area is also created on the panel by using JTextArea class
How to retrive an inmage from database and displaying it in imgae box - Swing AWT
How to retrive an inmage from database and displaying it in imgae box  hello Can you plz tell is there any imagebox related option in java swing... or pane in a JFrame.. is this possible? can you plz help tell me how we can do
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
Jcombo box - Swing AWT
Jcombo box  Hello sir i found dis site today...realy superb evn i complete half project with ur examples sir i hav problem related to combo box i hav 3 combox c1, c2, c3 c1 contains items A, B, C, D c2 contains items E, F, G
how to text send from list to textbox - Swing AWT
how to text send from list to textbox  dear sir/madam I whant to send text from list to textbox. plz give me solution for this problem.   Hi friend, Plz explain the problem in details to solve it and specify
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
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
create , edit MS WORD like document file using Java Swing - Swing AWT
create , edit MS WORD like document file using Java Swing   In my program I have JTextArea. Text in JTextArea can be set to selected font... document file. Then how should I create, edit , retrieve this document file
Auto grow Text Area using jQuery plug-in
Auto grow Text Area using jQuery plug-in In this section, you will learn how to create a text area which auto grow on increment of the content using jQuery... increase until you reach to 7th line of the text box . When you reach
reading data from a text box with the same name using servlets - JSP-Servlet
reading data from a text box with the same name using servlets  ... like a= b= c= using servlet i want to print all the values from each text box? is it possible.this question i faced in an interview. kindly reply
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
enable text box and label on selection
enable text box and label on selection  hello, Please tell me how to enable label and text box on selection of drop down list box. in drop down list box all values come from database. please reply

Ads