Popular Articles

The Anglo Sikh wars (1846-49) were the most ferocious battles faced by the British in India. These battles deeply affected the British psyche, with the
I have been wanting to write about the military heroes of the 20th century from India. We have so many great soldiers and airmen who are not remembered
Backwaters are unique tourist attractions of Kerala. Cruising along the marvelous Kerala backwaters on a traditional house boat is one of the best ways

Latest Articles

Backwaters are unique tourist attractions of Kerala. Cruising along the marvelous Kerala backwaters on a traditional house boat is one of the best ways
I have been wanting to write about the military heroes of the 20th century from India. We have so many great soldiers and airmen who are not remembered
The Anglo Sikh wars (1846-49) were the most ferocious battles faced by the British in India. These battles deeply affected the British psyche, with the

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