package com.tutego.insel.solutions.ui;

import java.awt.*;
import java.awt.event.*;

public class MausInTitelleiste2
{
  public static void main( String args[] )
  {
    Frame f = new Frame();

    f.addMouseMotionListener( new MyMML2(f) );
    f.addWindowListener( new MyWL2() );
    f.setSize( 400, 400 );
    f.setVisible( true );
  }
}

class MyMML2 implements MouseMotionListener
{
  Frame frame;

  public MyMML2( Frame f )
  {
    frame = f;
  }

  public void mouseDragged( MouseEvent e )
  {
  }

  public void mouseMoved( MouseEvent e )
  {
    frame.setTitle(" X = " + e.getX() + " / Y = " + e.getY());
  }
}

class MyWL2 implements WindowListener
{
  public void windowActivated( WindowEvent e )
  {
  }

  public void windowClosed( WindowEvent e )
  {
  }

  public void windowClosing(WindowEvent e)
  {
    System.exit(0);
  }

  public void windowDeactivated(WindowEvent e)
  {
  }

  public void windowDeiconified(WindowEvent e)
  {
  }

  public void windowIconified(WindowEvent e)
  {
  }

  public void windowOpened(WindowEvent e)
  {
  }
}
