SlideShare a Scribd company logo
JAVA WEEK8(A)
/* Week 8 : a) Write a Java program for handling mouse events. */



import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
/*
< applet code="LabPro15"   width=300 height=100>
< /applet>
*/
public class LabPro15 extends Applet implements MouseListener
{
        String msg="welcome";int x=100,y=100;
        public void init()
        {
        addMouseListener(this);
        }
        public void paint(Graphics g)
        {
                g.drawString(msg,x,y);
        }
        public void update(Graphics g)
        {
                paint(g);
        }
        public void mouseClicked(MouseEvent e)
        {
        }
        public void mousePressed(MouseEvent e)
        {
                msg="to";x=150;y=150;
                repaint();
        }
        public void mouseReleased(MouseEvent e)
        {
                msg="gmrit";x=200;y=200;
                repaint();
        }
        public void mouseEntered(MouseEvent e)
        {
        }
        public   void mouseExited(MouseEvent e)
        {
        }
}




                                       Page 1

More Related Content

What's hot

Trabajo Scilab
Trabajo ScilabTrabajo Scilab
Trabajo Scilab
alexistorres
 
Taller De Scilab
Taller De ScilabTaller De Scilab
Taller De Scilab
Andrés Renteria
 
Martha
MarthaMartha
Martha
MarthaPaz
 
Ejercicios Scilab Completo
Ejercicios Scilab CompletoEjercicios Scilab Completo
Ejercicios Scilab Completo
Ricardo Grandas
 
Tarea De Scilab By Sebastian Vasquez
Tarea De Scilab By Sebastian VasquezTarea De Scilab By Sebastian Vasquez
Tarea De Scilab By Sebastian Vasquez
Sebastian Vasquez
 
The Ring programming language version 1.6 book - Part 59 of 189
The Ring programming language version 1.6 book - Part 59 of 189The Ring programming language version 1.6 book - Part 59 of 189
The Ring programming language version 1.6 book - Part 59 of 189
Mahmoud Samir Fayed
 

What's hot (6)

Trabajo Scilab
Trabajo ScilabTrabajo Scilab
Trabajo Scilab
 
Taller De Scilab
Taller De ScilabTaller De Scilab
Taller De Scilab
 
Martha
MarthaMartha
Martha
 
Ejercicios Scilab Completo
Ejercicios Scilab CompletoEjercicios Scilab Completo
Ejercicios Scilab Completo
 
Tarea De Scilab By Sebastian Vasquez
Tarea De Scilab By Sebastian VasquezTarea De Scilab By Sebastian Vasquez
Tarea De Scilab By Sebastian Vasquez
 
The Ring programming language version 1.6 book - Part 59 of 189
The Ring programming language version 1.6 book - Part 59 of 189The Ring programming language version 1.6 book - Part 59 of 189
The Ring programming language version 1.6 book - Part 59 of 189
 

Viewers also liked

Java Week9(B) Notepad
Java Week9(B)   NotepadJava Week9(B)   Notepad
Java Week9(B) Notepad
Chaitanya Rajkumar Limmala
 
Java Week10 Notepad
Java Week10   NotepadJava Week10   Notepad
Java Week10 Notepad
Chaitanya Rajkumar Limmala
 
Java Week6(B) Notepad
Java Week6(B)   NotepadJava Week6(B)   Notepad
Java Week6(B) Notepad
Chaitanya Rajkumar Limmala
 
Java Week4(B) Notepad
Java Week4(B)   NotepadJava Week4(B)   Notepad
Java Week4(B) Notepad
Chaitanya Rajkumar Limmala
 
Java notes
Java notesJava notes
Chronic And Acute Illness Lecture
Chronic And Acute Illness LectureChronic And Acute Illness Lecture
Chronic And Acute Illness Lecture
cclemm1
 

Viewers also liked (6)

Java Week9(B) Notepad
Java Week9(B)   NotepadJava Week9(B)   Notepad
Java Week9(B) Notepad
 
Java Week10 Notepad
Java Week10   NotepadJava Week10   Notepad
Java Week10 Notepad
 
Java Week6(B) Notepad
Java Week6(B)   NotepadJava Week6(B)   Notepad
Java Week6(B) Notepad
 
Java Week4(B) Notepad
Java Week4(B)   NotepadJava Week4(B)   Notepad
Java Week4(B) Notepad
 
Java notes
Java notesJava notes
Java notes
 
Chronic And Acute Illness Lecture
Chronic And Acute Illness LectureChronic And Acute Illness Lecture
Chronic And Acute Illness Lecture
 

Similar to Java Week8(A) Notepad

Programa en java circulos
Programa en java circulosPrograma en java circulos
Programa en java circulos
Anel Sosa
 
662305 LAB12
662305 LAB12662305 LAB12
662305 LAB12
Nitigan Nakjuatong
 
Please help!!I wanted to know how to add a high score to this prog.pdf
Please help!!I wanted to know how to add a high score to this prog.pdfPlease help!!I wanted to know how to add a high score to this prog.pdf
Please help!!I wanted to know how to add a high score to this prog.pdf
JUSTSTYLISH3B2MOHALI
 
Task Write a Java program to implement a simple graphics editor tha.pdf
Task Write a Java program to implement a simple graphics editor tha.pdfTask Write a Java program to implement a simple graphics editor tha.pdf
Task Write a Java program to implement a simple graphics editor tha.pdf
cronkwurphyb44502
 
662305 LAB13
662305 LAB13662305 LAB13
662305 LAB13
Nitigan Nakjuatong
 
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdfimport java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
anyacarpets
 
Of class2
Of class2Of class2
Of class2
Janet Huang
 
Introduccion del curso
Introduccion del cursoIntroduccion del curso
Introduccion del curso
Wilfredo Nieves
 
ES6(ES2015) is beautiful
ES6(ES2015) is beautifulES6(ES2015) is beautiful
ES6(ES2015) is beautiful
monikagupta18jan
 
Applications
ApplicationsApplications
Applications
info_zybotech
 
Java awt
Java awtJava awt
Sbaw091117
Sbaw091117Sbaw091117
Sbaw091117
Atsushi Tadokoro
 
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートIIopenFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
Atsushi Tadokoro
 
662305 11
662305 11662305 11
Automated testing of mobile applications on multiple platforms
Automated testing of mobile applications on multiple platformsAutomated testing of mobile applications on multiple platforms
Automated testing of mobile applications on multiple platforms
jobandesther
 
Java-Events
Java-EventsJava-Events
Java-Events
Arjun Shanka
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignment
Abdullah Al Shiam
 
java - topic (event handling notes )1.ppt
java - topic (event handling notes )1.pptjava - topic (event handling notes )1.ppt
java - topic (event handling notes )1.ppt
adityakanna2
 
Of class1
Of class1Of class1
Of class1
Janet Huang
 
Awt
AwtAwt

Similar to Java Week8(A) Notepad (20)

Programa en java circulos
Programa en java circulosPrograma en java circulos
Programa en java circulos
 
662305 LAB12
662305 LAB12662305 LAB12
662305 LAB12
 
Please help!!I wanted to know how to add a high score to this prog.pdf
Please help!!I wanted to know how to add a high score to this prog.pdfPlease help!!I wanted to know how to add a high score to this prog.pdf
Please help!!I wanted to know how to add a high score to this prog.pdf
 
Task Write a Java program to implement a simple graphics editor tha.pdf
Task Write a Java program to implement a simple graphics editor tha.pdfTask Write a Java program to implement a simple graphics editor tha.pdf
Task Write a Java program to implement a simple graphics editor tha.pdf
 
662305 LAB13
662305 LAB13662305 LAB13
662305 LAB13
 
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdfimport java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
 
Of class2
Of class2Of class2
Of class2
 
Introduccion del curso
Introduccion del cursoIntroduccion del curso
Introduccion del curso
 
ES6(ES2015) is beautiful
ES6(ES2015) is beautifulES6(ES2015) is beautiful
ES6(ES2015) is beautiful
 
Applications
ApplicationsApplications
Applications
 
Java awt
Java awtJava awt
Java awt
 
Sbaw091117
Sbaw091117Sbaw091117
Sbaw091117
 
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートIIopenFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
 
662305 11
662305 11662305 11
662305 11
 
Automated testing of mobile applications on multiple platforms
Automated testing of mobile applications on multiple platformsAutomated testing of mobile applications on multiple platforms
Automated testing of mobile applications on multiple platforms
 
Java-Events
Java-EventsJava-Events
Java-Events
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignment
 
java - topic (event handling notes )1.ppt
java - topic (event handling notes )1.pptjava - topic (event handling notes )1.ppt
java - topic (event handling notes )1.ppt
 
Of class1
Of class1Of class1
Of class1
 
Awt
AwtAwt
Awt
 

More from Chaitanya Rajkumar Limmala

Java Week3(A) Notepad
Java Week3(A)   NotepadJava Week3(A)   Notepad
Java Week3(A) Notepad
Chaitanya Rajkumar Limmala
 
Java Week9(A) Notepad
Java Week9(A)   NotepadJava Week9(A)   Notepad
Java Week9(A) Notepad
Chaitanya Rajkumar Limmala
 
Java Week6(A) Notepad
Java Week6(A)   NotepadJava Week6(A)   Notepad
Java Week6(A) Notepad
Chaitanya Rajkumar Limmala
 
Java Week4(A) Notepad
Java Week4(A)   NotepadJava Week4(A)   Notepad
Java Week4(A) Notepad
Chaitanya Rajkumar Limmala
 
Java Week4(C) Notepad
Java Week4(C)   NotepadJava Week4(C)   Notepad
Java Week4(C) Notepad
Chaitanya Rajkumar Limmala
 
Java Week1(B) Notepad
Java Week1(B)   NotepadJava Week1(B)   Notepad
Java Week1(B) Notepad
Chaitanya Rajkumar Limmala
 
Java Week2(C) Notepad
Java Week2(C)   NotepadJava Week2(C)   Notepad
Java Week2(C) Notepad
Chaitanya Rajkumar Limmala
 
Java Week1(A) Notepad
Java Week1(A)   NotepadJava Week1(A)   Notepad
Java Week1(A) Notepad
Chaitanya Rajkumar Limmala
 
Java Week2(A) Notepad
Java Week2(A)   NotepadJava Week2(A)   Notepad
Java Week2(A) Notepad
Chaitanya Rajkumar Limmala
 

More from Chaitanya Rajkumar Limmala (11)

Java Week3(A) Notepad
Java Week3(A)   NotepadJava Week3(A)   Notepad
Java Week3(A) Notepad
 
Java Week9(A) Notepad
Java Week9(A)   NotepadJava Week9(A)   Notepad
Java Week9(A) Notepad
 
Java Week7 Notepad
Java Week7   NotepadJava Week7   Notepad
Java Week7 Notepad
 
Java Week6(A) Notepad
Java Week6(A)   NotepadJava Week6(A)   Notepad
Java Week6(A) Notepad
 
Java Week4(A) Notepad
Java Week4(A)   NotepadJava Week4(A)   Notepad
Java Week4(A) Notepad
 
Java Week4(C) Notepad
Java Week4(C)   NotepadJava Week4(C)   Notepad
Java Week4(C) Notepad
 
Java Week1(B) Notepad
Java Week1(B)   NotepadJava Week1(B)   Notepad
Java Week1(B) Notepad
 
Java Week2(C) Notepad
Java Week2(C)   NotepadJava Week2(C)   Notepad
Java Week2(C) Notepad
 
Java Week2(B) Notepad
Java Week2(B)   NotepadJava Week2(B)   Notepad
Java Week2(B) Notepad
 
Java Week1(A) Notepad
Java Week1(A)   NotepadJava Week1(A)   Notepad
Java Week1(A) Notepad
 
Java Week2(A) Notepad
Java Week2(A)   NotepadJava Week2(A)   Notepad
Java Week2(A) Notepad
 

Recently uploaded

Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
blueshagoo1
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 

Recently uploaded (20)

Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 

Java Week8(A) Notepad

  • 1. JAVA WEEK8(A) /* Week 8 : a) Write a Java program for handling mouse events. */ import java.awt.*; import java.awt.event.*; import java.applet.Applet; /* < applet code="LabPro15" width=300 height=100> < /applet> */ public class LabPro15 extends Applet implements MouseListener { String msg="welcome";int x=100,y=100; public void init() { addMouseListener(this); } public void paint(Graphics g) { g.drawString(msg,x,y); } public void update(Graphics g) { paint(g); } public void mouseClicked(MouseEvent e) { } public void mousePressed(MouseEvent e) { msg="to";x=150;y=150; repaint(); } public void mouseReleased(MouseEvent e) { msg="gmrit";x=200;y=200; repaint(); } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } } Page 1