I have a main frame named as "frame1". In "frame1" i want to add a panel to display something on the panel but I am not able to add the panel to my main frame i.e "frame1"
public void drawstack()
{
JPanel m1 = new JPanel(new BorderLayout());
m1.setBorder(BorderFactory.createRaisedSoftBevelBorder());
m1.setBackground(Color.red);
frame1.add(m1);
}
This is my code m getting an error at the last line i.e "frame1.add(m1);" error is
cannot find symbol : frame1.