My code had errors, I fixed them, and it still didn't overwrite, is what I was saying.
Alright, here's my exact movements:
Here's the code for Main.java:
-
import java.awt.Font;
-
import java.awt.Graphics;
-
import java.awt.Color;
-
-
public class Main extends java.applet.Applet {
-
-
public void paint(Graphics g) {
-
setBackground(Color.blue);
-
g.setFont(new Font("sansserif", Font.BOLD, 12));
-
g.drawString("FONT TEST", 10, 10);
-
}
-
}
-
Created new folder (named "New Folder").
Moved Main.java into New Folder.
Open up command prompt.
Command prompt says: "C:\Documents and Settings\registered user".
Typed "cd Desktop/New Folder"
Typed "javac Main.java"
That generated no response, which is good, I think.
I checked and the class file was in New Folder. I then opened up the applet in a web page in New Folder, and everything worked out okay.
I then tried to recompile it, this time changing the Color.blue to Color.black. Nothing changed in the applet.
So what do you think? Should I try a reinstall of javac?