Home Answers Viewqa Applet AWT Tutorials

 
 


praveen
AWT Tutorials
1 Answer(s)      2 years and 3 months ago
Posted in : Applet

How can i create multiple labels using AWT????

View Answers

February 16, 2011 at 11:37 AM


Java Applet Example multiple labels

1)AppletExample.java:

   import javax.swing.*;
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;

    public class AppletExample extends Applet implements ActionListener {
      TextField input1,input2,output;
      Label label1,label2,label3;
      Button b1;
      int num1,num2, sum = 0;
      public void init(){
        label1 = new Label("Number 1: ");
        add(label1);
        input1 = new TextField(5);
        add(input1);
        label2 = new Label("Number 2: ");
        add(label2);
        input2 = new TextField(5);
        add(input2);
        label3 = new Label("Sum : ");
        add(label3);
        output = new TextField(10);
        add(output);
        b1 = new Button("Add");
        add(b1);
        b1.addActionListener(this);
           }
      public void actionPerformed(ActionEvent ae){
        try{
          num1 = Integer.parseInt(input1.getText());
          num2 = Integer.parseInt(input2.getText());
          sum = num1+num2;
          output.setText(Integer.toString(sum));
         }
        catch(NumberFormatException e){
        }
      }
    }

2)applet.html:

<HTML>
<BODY>
<APPLET ALIGN="CENTER" CODE="AppletExample.class" width = "260" height = "200"></APPLET>
</BODY>
</HTML>









Related Pages:
AWT Tutorials
AWT Tutorials  How can i create multiple labels using AWT????   Java Applet Example multiple labels 1)AppletExample.java: import javax.swing.*; import java.applet.*; import java.awt.*; import
AWT-swings tutorial - Swing AWT
AWT-swings tutorial  hello sir, i am learnings swings and applets.. i want some tutorials and some examples related to swings.. thank you sir..waiting for your answer.  Hi friend, I am sending you a link
AWT basics
? Here we have provided you the links to our AWT tutorials. AWT stands... good GUI for windows applications. Here are the links to AWT Tutorials: AWT... AWT tutorials Thanks
SWINGS - Swing AWT
more information,Examples and Tutorials on Swing,AWT visit to : http://www.roseindia.net/java/example/java/awt/ http://www.roseindia.net/java/example/java
AWT
AWT  How to set size of button in awt
awt
JDBC in awt applet  how to display data using JDBC in awt/applet
awt
Java AWT Applet example  how to display data using JDBC in awt/applet
awt
JDBC and AWT to display data  how to display data using JDBC in awt/applet
awt
JDBC in awt  how to display data using JDBC in awt/applet
tooltip problem - Swing AWT
tooltip problem  Hi All, I am using SWT_AWT bridge in my code to embed swing components into SWT Composite. I am using a Swing JButton in SWT.../tutorials/swt/ Thanks
SWT Solaris - Swing AWT
://www.roseindia.net/tutorials/swt/ Thanks
Roseindia Java Tutorials
Roseindia Java Tutorials are intended to provide in-depth knowledge of Java... with roseindia Java Tutorials is quite simple and easy, which will teach you... elaborately in easy and simple way. Java Tutorials roseindia are created
AWT
Site Map - All java tutorials
Site Map - All java tutorials In this section of sitemap we have listed all the important sections of java tutorials. Select the topics you want..., Spring, SQL, JSF and XML Tutorials.   These All Java Tutorials links
SWT login form - Swing AWT
/tutorials/swt/ Thanks
Java Swing Tutorials
Java Swing Tutorials       Java Swing tutorials -  Here you will find many Java Swing examples... use it in your program. Java Swing tutorials first gives you brief description
AWT & SWING
AWT & SWING  What is diffennce between AWT & SWING
AWT programmes - Swing AWT
AWT programmes  I need few programs for menus in AWT. how to open a filed dialog window, and how to save a image in the save window when we press... has all AWT programms which must open,save and make changes to a particular
hybrid graph (jfree chart) - Swing AWT
://www.roseindia.net/software-tutorials/detail/21893 Thanks
awt in java
awt in java  using awt in java gui programming how to false the maximization property of a frame
tutorials - EJB
ejb tutorial for beginners free  Can anyone give me the reference of EJB tutorials for beginners
Java AWT
Java AWT  What interface is extended by AWT event listeners
awt jdbc
awt jdbc  programm in java to accept the details of doctor (dno,dname,salary)user & insert it into the database(use prerparedstatement class&awt
JSP Tutorials
JSP Tutorials  Hi, I am confident in core java. I have learned if from roseindia.net. Now I want to learn JSP. Can anyone tell me JSP tutorials url... roseindia.net. Now you can learn Java Server pages at our JSP Tutorials section
SWT "Enter" key event - Swing AWT
://www.roseindia.net/tutorials/swt/ Thanks
awt - Swing AWT
awt  dear sir my proble is , i have applet code which is stock market chart this code made using "AWT" . in this chart one textbox when user.../java/awt/ Thanks
Java AWT
Java AWT  What is meant by controls and what are different types of controls in AWT
java tutorials
java tutorials  Hi, Much appreciated response. i am looking for the links of java tutorials which describes both core and advanced java concepts in detail with examples in a systematic order.few links i found are discussing
JSP Tutorials - Page 3
JSP Tutorials - Page 3
Photoshop - Photoshop Tutorials
Photoshop - Photoshop Tutorials
C++Tutorials
other tutorials, such as C++: Annotations by Frank Brokken and Karel Kubat...; The CPlusPlus Language Tutorial These tutorials explain the C++ language.... We have a series of online courses and tutorials that will teach you either
awt swings - Swing AWT
awt swings  hello sir, My requirement is to insert captured image from cam onto a frame and from that place i hve to save it in the database(MySql).its urgent sir.it is a part of my project..if code is available
JAVA AWT BASE PROJECT
JAVA AWT BASE PROJECT  suggest meaningful java AWT-base project
java awt calender
java awt calender  java awt code for calender to include beside a textfield
Roseindia Tutorials
Roseindia.net website Tutorials brings you the best tutorials for different computing platforms and programming languages like Java Tutorials, JSP Tutorials, Hibernate Tutorials, Struts Tutorials, JSF Tutorials, MySQL Tutorials, Spring
Java Example Codes and Tutorials
Java Tutorials - Java Example Codes and Tutorials Java is great programming... tutorials: Core Java Java SE 6 Java SE 7... tutorials we will provide you detailed introduction of these Java Tools. 
awt list item* - Swing AWT
awt list item*  how do i make an item inside my listitem not visible  Hi friend, import java.awt.*; import java.awt.event.... information. http://www.roseindia.net/java/example/java/awt/ Thanks
Java AWT event hierarchy
Java AWT event hierarchy  What class is the top of the AWT event hierarchy?  The java.awt.AWTEvent class is the highest-level class in the AWT event-class hierarchy
java - Swing AWT
What is Java Swing AWT  What is Java Swing AWT
AWT code for popUpmenu - Swing AWT
AWT code for popUpmenu  Respected Sir/Madam, I am writing a program in JAVA/AWT.My requirement is, a Form consists of a "TextBox" and a "Button... for more information. http://www.roseindia.net/java/example/java/awt/pop
Basic Diffence between Swing-AWT - Swing AWT
Basic Diffence between Swing-AWT  What is Basic Diffence between Swing-AWT
navigating the value of JTextField from one JFrame to another - Swing AWT
the working code for this or plz tell me is there any tutorials available
AWT Image
AWT Image  I have loaded two images using toolkit in java.one is concentric rectangle and other is concentric circle.kindly someone send me the source code of interchanging the inner most rectangle with the inner most circle
Site map - C Tutorials
; C Tutorials  | Java Tutorials | PHP Tutorials  | Linux Tutorials | WAP Tutorial  | Struts Tutorial  | Spring FrameWork Tutorial | MySQL Tutorials | XML Tutorial  |  VB
awt - Java Interview Questions
awt  what is the difference between awt and swings  Hi friend, These are basically the main differences between awt and swing. 1.swing components sits on the top of AWT components and do the wiork. 2.AWT

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.