i'm using NetBeans and i keep getting an error in this code:
package desktopapplication7;
import java.awt.*;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class Frame extends JFrame
{
Container c= getContentPane();
setLayout(new BorderLayout(5,10));
JPanel p= new JPanel();
p.add(new JButton("OK")); // ERROR HERE
c.add(p,BorderLayout.Center); // ERROR HERE
}
on both lines above, it keeps telling me : <identifier> Expected.
can anyone help me fixing this ?