Warning message - uses unchecked or unsafe operations, please assist

I am in the final stages of completing a college assignment. It works as it should, but when compiled it throws an error warning - about unchecked or unsafe operations. I would like a clean build but do not know what I'm doing wrong. Could you please have a look at my code and advise. Any additional information on how to prevent similar issues in future would also be appreciated. Thanks.
/*
 * Spotting.java
 *
 * Created on 13 July 2007, 14:07
 *
 */
 
package tma03q4;
 
 
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
 
/**
 *
 * @author M257
 */
public class Spotting extends JFrame
{
   // Insert declarations here
   JRadioButtonMenuItem small;
   JRadioButtonMenuItem medium;
   JRadioButtonMenuItem large;
   
   JRadioButtonMenuItem red;
   JRadioButtonMenuItem green;
   JRadioButtonMenuItem blue;
   
   private JMenuItem undoItem;
   
   private int xVal,yVal,numberOfClicks=0;
   
   // OU code starts below. Above code is mine
   private ArrayList<Spot> spots;
   
   private static int SMALL = 10;
   private static int MEDIUM = 20;
   private static int LARGE = 40;
   
   private int currentSize = SMALL;
   
   private Color currentColor = Color.RED;
   
   private JPanel canvas;
   
   public Spotting()
   {
      setSize(300, 300);
      setTitle("Spotting");
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      canvas = new JPanel();
      canvas.setBackground(Color.WHITE);
      canvas.addMouseListener(new MouseWatcher());
      
      // Insert code here to construct the GUI
      //01.02.2008 @ 19:43 Starting work on the assignment:
      
      //Start with setting up the menu bar and menu items
      JMenuBar spottingMenuBar = new JMenuBar();
      
      //Trying to implement the menu items using radio buttons
      
      ButtonGroup sizeGroup = new ButtonGroup();
      ButtonGroup colourGroup = new ButtonGroup();
      
      JMenu spottingSizeMenu = new JMenu("Size");
      JMenu spottingColourMenu = new JMenu("Colour");
      JMenu spottingEditMenu = new JMenu("Edit");
      
      small = new JRadioButtonMenuItem("Small",true);
      medium = new JRadioButtonMenuItem("Medium",false);
      large = new JRadioButtonMenuItem("Large",false);
      
      small.addActionListener (new MenuSelection());
      medium.addActionListener(new MenuSelection());
      large.addActionListener(new MenuSelection());
      
      sizeGroup.add(small);
      sizeGroup.add(medium);
      sizeGroup.add(large);
      
      red = new JRadioButtonMenuItem("Red",true);
      green = new JRadioButtonMenuItem("Green",false);
      blue = new JRadioButtonMenuItem("Blue",false);
      
      red.addActionListener(new MenuSelection());
      green.addActionListener(new MenuSelection());
      blue.addActionListener(new MenuSelection());
      
      spottingSizeMenu.add(small);
      spottingSizeMenu.add(medium);
      spottingSizeMenu.add(large);
      
      spottingColourMenu.add(red);
      spottingColourMenu.add(green);
      spottingColourMenu.add(blue);
      
      undoItem = new JMenuItem("Undo");
      undoItem.addActionListener(new MenuSelection());
      undoItem.setAccelerator(KeyStroke.getKeyStroke("control Z"));
      spottingEditMenu.add(undoItem);
      
      spottingMenuBar.add(spottingSizeMenu);
      spottingMenuBar.add(spottingColourMenu);
      spottingMenuBar.add(spottingEditMenu);
      
      
      colourGroup.add(red);
      colourGroup.add(green);
      colourGroup.add(blue);
     
      setJMenuBar(spottingMenuBar);
     
      spots = new ArrayList();
      
      getContentPane().add("Center", canvas);
   }
   
   public void paint(Graphics g)
   {
      super.paint(g);
      Graphics gr = canvas.getGraphics();
      
     // Insert drawing code here
      //02.02.2008, dabbling with drawing the spot
      for (int i=0;i<numberOfClicks;i++)
      {
         gr.setColor(spots.get(i).getColour());
         gr.fillOval((spots.get(i).getX()-(spots.get(i).getRadius()/2)),
               (spots.get(i).getY()-(spots.get(i).getRadius()/2)),
               spots.get(i).getRadius(),
               spots.get(i).getRadius());
      }
   }
  // Insert code here to define the listener classes
     public class MenuSelection implements ActionListener
   {
      public void actionPerformed (ActionEvent e)
      {
         if (e.getSource()==small)
         {
            currentSize = SMALL;
         }
         
         if (e.getSource()==medium)
         {
            currentSize = MEDIUM;
         }
         
         if (e.getSource()==large)
         {
            currentSize = LARGE;
         }
         if (e.getSource()==red)
         {
            currentColor = Color.RED;
         }
         
         if (e.getSource()==green)
         {
            currentColor = Color.GREEN;
         }
         
         if (e.getSource()==blue)
         {
            currentColor = Color.BLUE;
         }
         if (e.getSource()==undoItem)
         {
            if (numberOfClicks>0)
            {
               spots.remove(numberOfClicks-1);
               numberOfClicks--;
            }
         }
        
         repaint();
      }
   }
 
      
   private class MouseWatcher extends MouseAdapter
   {
      public void mouseClicked (MouseEvent m)
      {
         xVal = m.getX();
         yVal = m.getY();
         spots.add(new Spot(currentColor, xVal, yVal, currentSize));
         numberOfClicks++;
         repaint();
      }
   }
   
  /* public void setColor(Color c)
   {
      currentColor = c;
   }
    */
}

Open in new window

appreticeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gatorvipCommented:
>> spots = new ArrayList();

that should probably be java.util.ArrayList<Spot>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
appreticeAuthor Commented:
Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Project Management

From novice to tech pro — start learning today.