how to Write a java program for handling mouse events.

 Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to Write a java program for handling mouse events .So let’s go to our topic   import java.io.*; import java.applet.Applet; import java.awt.*; import java.awt.event.*; /*<applet code=Mouse height=400 width=400></applet>*/ public class Mouse extends Applet implements MouseListener,MouseMotionListener { String txt=””; int … Read more

how to Write a java program that allows the user to draw lines,rectangles and ovals.

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about Write a java program that allows the user to draw lines,rectangles and ovals. Java Source Code.     import java.awt.*; import java.applet.*; public class Draw extends Applet { public void paint(Graphics g) { g.setColor(Color.BLUE); g.drawLine(3,4,10,23); g.drawOval(195,100,90,55); g.drawRect(100,40,90,5); g.drawRoundRect(140,30,90,90,60,30); } } /*<applet … Read more