Core Java| JSP| Servlets| XML| EJB| JEE5| Web Services| J2ME| Glossary| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
AWT Components 
 

The class component is extended by all the AWT components. More of the codes can be put to this class to design lot of AWT components. Most of the AWT components shown below directly extend Component like Button, Canvas, Label etc.

 

AWT Components

                         

The class component is extended by all the AWT components. More of the codes can be put to this class to design lot of AWT components. Most of the AWT components shown below directly extend Component like Button, Canvas, Label etc. 

Buttons

As shown in the example below, a button is represented by a single label. That is the label shown in the example can be pushed with a click of a mouse.

 

 

import java.awt.*; 
import java.applet.Applet; 
 
public class MyButton extends Applet 
  public void init() { 
    Button button = new Button("SUBMIT")
    add(button)
  

Here is the HTML code:

<HTML>
<HEAD>
</HEAD>
<BODY>
<APPLET ALIGN="CENTER" CODE="MyButton" WIDTH="400" HEIGHT="200"></APPLET>
</BODY>
</HTML>

Here is the Output:

C:\newprgrm>javac MyButton.java

C:\newprgrm>appletviewer MyButton.html

C:\newprgrm>

 

Download this example.

                         

» View all related tutorials
Related Tags: c class make method sed boolean value ole set oo frame if boo to ram bool argument e il not

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

2 comments so far (
post your own) View All Comments Latest 10 Comments:

sir please tell me about the latest book in java tread and java game programmig.

Posted by Talwinder singh on Monday, 12.15.08 @ 11:45am | #82790

please make advance examples or send some of the examples to me

Posted by Harpreet on Wednesday, 04.16.08 @ 14:58pm | #56697

Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.