My Blog
Articles related to programming, computer science, technology and research.

Applet program to handle mouse events

08/06/2016 Categories: Applets. Comments Off on Applet program to handle mouse events

Applet program to handle mouse events. import java.applet.*; import java.awt.*; import java.awt.event.*; public class MouseApplet extends Applet implements MouseListener { String msg=”Initial Message”; public void init() { addMouseListener(this); } public void mouseClicked(MouseEvent me) { msg = “Mouse Clicked”; repaint(); } public void mousePressed(MouseEvent me) { msg = “Mouse Pressed”; repaint(); } public void mouseReleased(MouseEvent me) […]

Read the rest of this entry »

Applet program to draw lines, ovals, and rectangles

08/06/2016 Categories: Applets. Comments Off on Applet program to draw lines, ovals, and rectangles

Applet program to draw lines, ovals, and rectangles.

Output for the above program is as follows:

Read the rest of this entry »

Applet program that displays the content of the file

08/06/2016 Categories: Applets. Comments Off on Applet program that displays the content of the file

Applet program┬áthat displays the content of the file.  

Contents of sample.txt file: Hi, welcome to Java. Output for the above program is as follows:

Read the rest of this entry »
Scroll Up