Tag Archives: applet

Java Applet MouseEvents

By | April 22, 2012

A simple event based applet applications is described below First importing the necessary header files // Demonstrate the mouse event handlers. import java.awt.*; import java.awt.event.*; import java.applet.*; /* <applet code=”MouseEvents” width=300 height=100> </applet> */ Next step is to create a class which implements the “MouseListener” and “MouseMotionListener “ public class MouseEvents extends Applet implements MouseListener, MouseMotionListener { String msg =… Read More »

Applet FlowLayout Example

By | May 16, 2011

The FlowLayout class puts components in a row, sized at their preferred size. Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps. The hgap and vgap arguments specify the number of pixels to put between components. The output window look like this