Perhaps you should have named this thread: Need help using Netbeans.
Your title says you want help using Grahpics.
Type: Posts; User: Norm
Perhaps you should have named this thread: Need help using Netbeans.
Your title says you want help using Grahpics.
Sorry, I don't know anything about using your IDE. I thought you were writing a java program, but I see its the IDE that is writing the program.
Do you know how to use an anonymous class? That's one of the easiest ways to override an method.
Panel pnl = new Panel() {
@Override
public void paint(Graphics g) {
// do your...
Override the paintComponent method for the panel and put your drawing code there.