**Never mind, there was an error somewhere else in the program.**
If anyone is interested though:
Original problem was a ClassCastException error I was getting. Relevant code is:
//Menu drop box items. public enum shapes {Circle, Square, Oval,} //ComboBox private JPanel shapesPanel = new JPanel(); private JComboBox shapesComboBox = new JComboBox(shapes.values()); //...More code... protected void shapesPanelMouseClicked(MouseEvent evt) { //Get x and y values of mouse location //and selected shape. int x = evt.getX(); int y = evt.getY(); shapes shapeChoice = (shapes) shapesComboBox.getSelectedItem(); switch (shapeChoice){ case Circle: drawCircle(x, y); break; case Square: drawSquare(x, y); break; case Oval: drawOval(x, y); break; }
All I'd done is left a line similar to:
String shapeChoice = shapesComboBox.getSelectedItem();
elsewhere in the code. This was used before I changed from using a String Array to an enum for the JComboBox.