The error is obvious. See in your code carefully, you missed
{
after creating class. Try this:
public class Pledgeform2.java extends javax.swing.JFrame
{
public Pledgeform2() {
initComponents();
};
JFrame guiFrame = new JFrame();
JPanel panel_1;
JLabel label_1;
JLabel label_2;
ButtonGroup cbg;
JRadioButton radio_1;
JRadioButton radio_2;
JRadioButton radio_3;
JRadioButton radio_4;
JList list_1;
JScrollPane sp_list_1;
JLabel label_3;
public static void main(String args[]) {
}
public Pledgeform2() {
Pledgeform2Layout customLayout = new Pledgeform2Layout();
panel_1 = new JPanel();
label_1 = new JLabel("Last Name");
label_2 = new JLabel("First Name");
cbg = new ButtonGroup();
radio_1 = new JRadioButton("$10.00", false);
cbg.add(radio_1);
radio_2 = new JRadioButton("$20.00", false);
cbg.add(radio_2);
radio_3 = new JRadioButton("$50.00", false);
cbg.add(radio_3);
radio_4 = new JRadioButton("Other Amount", false);
cbg.add(radio_4);
DefaultListModel listModel_list_1 = new DefaultListModel();
listModel_list_1.addElement("Red Cross");
listModel_list_1.addElement("Salvation Army");
listModel_list_1.addElement("Humane Society");
listModel_list_1.addElement("Poor UofP Students");
list_1 = new JList(listModel_list_1);
sp_list_1 = new JScrollPane(list_1);
label_3 = new JLabel("Call 1-800-555-6789 if pledging other amount");
}
}
--Amit