hi all.. plz help me
import java.awt.*; import javax.swing.*; import java.awt.event.*; public class Mouse implements MouseMotionListener{ JFrame f; JLabel coord; public void initGUI(){ JFrame f=new JFrame(); JLabel coord=new JLabel(); Container con=f.getContentPane(); con.add(coord); f.setLayout(new FlowLayout()); f.setSize(400,400); f.setVisible(true); f.addMouseMotionListener(this); public void mouseDragged(MouseEvent me){int x=me.getX(); int y=me.getY(); coord.setText("Dragged at [" + x + "," + y + "]" ); } public void mouseMoved(MouseEvent me){ int x = me.getX(); int y = me.getY(); coord.setText("Moved at [" + x + "," + y + "]" ); } } public void Mouse(){ initGUI(); } public static void main(String args[]){ Mouse ex=new Mouse(); } }