You've probably missed a type designation on a variable or parameter somewhere above that code then, because there is nothing wrong with those two lines. Which line specifically is indicated as the cause?
The setEchoChar() line gets highlighted. And when I put // infront of that line to make it a comment, the program compiles fine. I am using BlueJ wich I heard isn't that great so I don't know if that has anything to do with it.
I think I actually imported more than I needed.
This is all the code that I have before the problematic segment:
public class GradeBook2 extends JFrame
JPanel All=new JPanel();
//reference ints for loops
//Counter for times Enter is pressed
//Declaring the arrays for the classes.
ArrayList CompSciAP=new ArrayList();
ArrayList CompSciIB=new ArrayList();
ArrayList AlgebraII=new ArrayList();
ArrayList TempRemove=new ArrayList();
ArrayList EditList=new ArrayList();
//OptionPanes to display class information
JOptionPane CompSciAPPane=new JOptionPane();
JOptionPane CompSciIBPane=new JOptionPane();
JOptionPane AlgebraIIPane=new JOptionPane();
JOptionPane Messages=new JOptionPane();
//String to check the password
//Strings needed to add and remove students
//declares labels for display
JLabel Title=new JLabel("Enter Password");
Label APLabel=new Label("");
Label IBLabel=new Label("");
Label A2Label=new Label("");
//declares text feild for password
TextField passGet=new TextField(10);
I am downloading Xcode now to see if it works there.