Popular Articles

  I was a small boy when John Wayne died in 1979. But even at that age  I loved the films of John Wayne and watched them in cinema halls with
It is imperative that we have a relaxing atmosphere within the four walls that we call our home that has a calming effect on us and remains Stress-Free! How
Role of Inner Strength in our Life The inner strength should be the most important part of every human being since no one can do a thing properly without

Latest Articles

Life is not that easy Most of us cannot tolerate untidiness around us be it our home or office. In fact we hate our foolishness and we curse ourselves
Role of Inner Strength in our Life The inner strength should be the most important part of every human being since no one can do a thing properly without
  I was a small boy when John Wayne died in 1979. But even at that age  I loved the films of John Wayne and watched them in cinema halls with

import java.awt.*;

import java.awt.event.*;

import java.applet.*;

/*

*/

public class AdapterDemo extends Applet

{

        public void init()

        {

                addMouseListener(new MyMouseAdapter(this));

                addMouseMotionListener(new MyMouseMotionAdapter(this));

        }

}

class MyMouseAdapter extends MouseAdapter

{

        AdapterDemo adapterDemo;

        public MyMouseAdapter(AdapterDemo adapterDemo)

        {

                this.adapterDemo = adapterDemo;

        }

        public void mouseClicked(MouseEvent me)

        {

                adapterDemo.showStatus("Mouse Clicked");

        }

}

class MyMouseMotionAdapter extends MouseMotionAdapter

{

        AdapterDemo adapterDemo;

        public MyMouseMotionAdapter(AdapterDemo adapterDemo)

        {

                this.adapterDemo = adapterDemo;

        }

        public void mouseDragged(MouseEvent me)

        {

                adapterDemo.showStatus("Mouse dragged");

        }

}

  • No comments found