The JPanel won't show on the JFrame and I have no idea why. It seems like the JPanel isn't being added to the JFrame somehow. Any suggestions?
import java.awt.*;
import javax.swing.*;
public class LeaseItGUI extends JPanel{
private int width=600,height=600;
public void paintComponenet(Graphics g){
super.paintComponent(g);
g.fillRect(0, 0, width, height);
}
}
import javax.swing.*;
import java.awt.*;
public class LeaseItMain extends JFrame{
private int width=600,height=600;
public LeaseItMain(){
setSize(width,height);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setResizable(false);
LeaseItGUI theGui = new LeaseItGUI();
setVisible(true);
add(theGui);
}
public static void main(String[] args){
LeaseItMain LIM = new LeaseItMain();
}
}