i know, it not mine at all, i was just running thru a manual trying to get an idea of what i'm going for, just so other know. here's my code....

Code:
private class mouseImgEventHandler implements MouseListener, MouseMotionListener {

      //empty body of methods.
      public void mousePressed(MouseEvent e) {}
      public void mouseReleased(MouseEvent e) {}
      public void mouseEntered(MouseEvent e) {}
      public void mouseExited(MouseEvent e) {}
      public void mouseMoved(MouseEvent e) {}
      public void mouseDragged(MouseEvent e) {}

      //get X-Y location when mouse is clicked.
      public void mouseClicked(MouseEvent e) {
         int currentX = e.getX();
         int currentY = e.getY();

         //display X-Y on the message board.
         if(panelID == 1)
            parent.leftDisplay.setText("X:  " + currentX + ",   Y:  " + currentY);
         if(panelID == 2)
            parent.rightDisplay.setText("X:  " + currentX + ",   Y:  " + currentY);
         if(panelID == 3)
            parent.resultDisplay.setText("X:  " + currentX + ",   Y:  " + currentY);
         //repaint();
      }
   }
i just put that up the as an example of what i am tryign to do.

based on the x/y coordinates i get when i click the mouse, I want to draw circles..

Code:
 public void paintComponent(Graphics graphics) {
       Graphics2D g = (Graphics2D)graphics.create();
       // eyes
       g.setColor(Color.red);
       g.fillOval(30, 30, 8, 8);
       g.fillOval(62, 30, 8, 8);


.but how do i pass the mouse coordnates to the drawing of the oval ?
Code:
     if(panelID == 1)
            parent.leftDisplay.setText("X:  " + currentX + ",   Y:  " + currentY);
       // eyes
       g.setColor(Color.red);
       g.fillOval(30, 30, 8, 8);
       g.fillOval(62, 30, 8, 8);
and where would i incldue a line like this
Code:
public void paintComponent(Graphics graphics) {
       Graphics2D g = (Graphics2D)graphics.create();
...at the begginign of my mouse handler, or some where else ?



does that clear my idea more, i thanks you again for stopping to help. justin