HI: I am having trouble getting my app to compile due to the GridBagLayout. The error I am getting is "Form.java:118: cannot resolve symbol symbol : method add (javax.swing.JCheckBox,int,int,int,int) location: class java.awt.Container getContentPane().add(ckHourly, 0, 1, 1, bFill);" In fact, I am getting a error everywhere I am doing a getContentPane().add. Any clues would be appreciated. The code, rather lengthy, is:
[This message has been edited by Cindy Glass (edited October 29, 2001).]
Compare your add method with the API they don't match. You need to investigate GridBagLayout a little more. It looks like you are trying to set your grid within the add.
Joined: Dec 07, 2000
Thanks. I have been looking at the 1.3 API but still confused. I am trying to add my labels, textfields and buttons in the grid.
Joined: May 17, 2001
Here is a link the the sun tutorial on GridBagLayout. This link is to the explanation of using the layout. Notice that in the explanation that the constraints are set then the component is added to the container.
In the above example a button is added to grid location 0, 0. There are other ways to position them as well but the grid location will get you started.