i had this problem with this code and it got the error "Cannot resolve symbol 'Gamepanel'"
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
public class GameFrame extends JFrame{
GameFrame(){
GamePanel panel;
panel = new Gamepanel();
this.add(panel);
this.setTitle("Pong Game");
}
}
can someone help me, please?
The problem is that you variable panel is from the type GamePanel. Therefore, when you assign panel an Instance, you have to write the classname correct: