The following code will not work, because Java will not recognize GridBagConstraints(), even though I have imported both java .awt.*;
and java.awt.GridBagConstraints;
/>
here is the code:
I am at my wits end with this now, and I have a project that is due tomorrow!!
/>/>/>/>
I need to arrange items within my GUI, and wanted to use GridBagLayout to do so, but Java won't allow it for some reason....
/>/>/>/>
Can someone PLEASE tell me what is wrong here, because I have seen this done a million times, and all that was needed was to import java.awt.*; and it worked fine, but for some reason it has decided to be difficult tonight and I cannot see what is wrong here??
/>/>/>/>
and java.awt.GridBagConstraints;

here is the code:
import java.awt.GridBagConstraints; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.lang.*; public class PRG421 extends JFrame{ String[] stuff = {"Footwear", "Jewelery", "Electronics", "Housewares", "Bathroom"}; //Set department choices for drop-down combobox menu JComboBox box = new JComboBox(stuff); //create and populate combobox double pryc; double prcnt; double reduct = prcnt / 100; double salpryc = pryc - reduct; private JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints const = new GridBagConstraints();// SAYING this is invalid method declaration??
I am at my wits end with this now, and I have a project that is due tomorrow!!

I need to arrange items within my GUI, and wanted to use GridBagLayout to do so, but Java won't allow it for some reason....

Can someone PLEASE tell me what is wrong here, because I have seen this done a million times, and all that was needed was to import java.awt.*; and it worked fine, but for some reason it has decided to be difficult tonight and I cannot see what is wrong here??
