i am tyring to get a line to re-draw from where the mouse is clicked. the *** in my code is where i am trying to redraw the line but i cant find the right code to make it work. Thanks in advance for any help.
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.*;
import java.awt.geom.Line2D;

public class MouseApplet extends Applet{

  public MouseApplet(){

    class MousePressListener implements MouseListener{

      public void mousePressed(MouseEvent event){
        int x = event.getX();
        int y = event.getY();

      public void mouseReleased(MouseEvent event){}
      public void mouseClicked(MouseEvent event){}
      public void mouseEntered(MouseEvent event){}
      public void mouseExited(MouseEvent event){}

    MouseListener listener = new MousePressListener();

  public void paint(Graphics g){
    Line2D.Double jimsline = new Line2D.Double(x,y,x2,y2);
    Graphics2D g2 = (Graphics2D)g;

  private Line2D.Double jimsline;
  private static final int x = 100;
  private static final int y = 100;
  private static final int x2 = 20;
  private static final int y2 = 30;
[ArchAngel added CODE tags and indented code]