New Member FAQ
|
Forums
|
Earn Revenue
Resources
Entrance
Ask Experts
Exam Papers
Jobs
English
Projects
Universities
Colleges
Courses
Schools
Training
My India
Members
|
Communities
|
Business Directory
|
Classifieds
|
Reviews
|
Silverlight Games
|
Peer Appraisal
|
Bookmarks
|
Polls
|
Mentors
|
Links
|
MCA Projects
|
Lobby
|
Gift Shop
|
Chat
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
N K Ravishanka...
(440)
PROSENJIT MANN...
(282)
Latha Jayaprak...
(233)
Last 7 Days
Mr. Anindya
(2274)
PROSENJIT MANN...
(2103)
Shobha Manasa
(1424)
more...
Awards & Gifts
Online Exams
Aptitude Questions
General Aptitude Tests
Medical Entrance
Engineering Entrance
Bank Tests
TOEFL & IELTS Questions
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
Resources
»
Articles/Knowledge Sharing
»
Education
»
Program for Handling Java Label class
Posted Date: 09 Dec 2008
Resource Type:
Articles/Knowledge Sharing
Category:
Education
Author:
uday kiran
Member Level:
Silver
Rating:
Points
: 2
/*Handling Labels*/
Aim: We will handle the Labels using Label Class and operations on Labels provided by the java.awt package.
import java.awt.*;
import java.awt.event.*;
public class HandlingLabels extends Frame implements MouseListener
{
Label l1 = new Label("First");
Label l2 = new Label("Second");
public HandlingLabels()
{
super("Handling Labels");
setSize(200,300);
setLayout(new FlowLayout());
add(l1);
add(l2);
l1.addMouseListener(this);
l2.addMouseListener(this);
setVisible(true);
}
public void mousePressed(MouseEvent me) { }
public void mouseClicked(MouseEvent me) { }
public void mouseReleased(MouseEvent me) { }
public void mouseEntered(MouseEvent me)
{
if(me.getSource() == l1)
l1.setText("On Me");
else
l2.setText("On Me");
}
public void mouseExited(MouseEvent me)
{
if(me.getSource() == l1)
l1.setText("First");
else
l2.setText("Second");
}
public static void main(String args[])
{
new HandlingLabels();
}
}
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
to add tags.
Java Programs
.
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Program to Handle Java Button class
Previous Resource:
Terms used in Share Market
Return to Discussion Resource Index
Post New Resource
Category:
Education
Post resources and
earn money
!
More Resources
Program to Handle Java Button class
IAS Preliminary Exam Syllabus for Zoology
IAS Preliminary Exam Syllabus for Statistics
IAS Preliminary Exam Syllabus for Sociology
IAS Preliminary Exam Syllabus for Public Administration
IAS Preliminary Exam Syllabus for Psychology
Advertise Here
Contact Us
Advertise
Editors
Privacy Policy
Terms Of Use
ISC Technologies.
2006 - 2009 All Rights Reserved.