Quit = new QuitButton();
This is a bad idea. You've told Quit that it's an object of class QuitButton.
Unless you have a class called QuitButton.
Type: Posts; User: javapenguin
Quit = new QuitButton();
This is a bad idea. You've told Quit that it's an object of class QuitButton.
Unless you have a class called QuitButton.
Your whole class is a JPanel. Why are you adding another JPanel to it?
I've done it where I've had a whole class that was a JFrame but I used a JPanel to put everything on, that way I could add...
import javax.swing.*;
import java.awt.*;
@SuppressWarnings ("serial")
public class GameOfLifeApp extends JFrame {
// constructor
public GameOfLifeApp (String title, String fname) {
//...