CODE
class tgrid
{
public static void main(String [] args)
{
JFrame f = new JFrame("peme");
GridLayoutPlus glp = new GridLayoutPlus(0, 3, 10, 10);
glp.setColWeight(1, 2);
glp.setColWeight(2, 1);
glp.setRowWeight(2, 1);
f.setLayout(glp);
for (int r = 0; r < 6; r++) {
for (int c = 0; c < 3; c++) {
f.add(new JButton(r+","+c));
}
}
}
}
the error that occur when compile the program tgrid.java..what i should do...
$ javac tgrid.java
tgrid.java:7: cannot find symbol
symbol : class JFrame
location: class tgrid
JFrame f = new JFrame("peme");
^
tgrid.java:7: cannot find symbol
symbol : class JFrame
location: class tgrid
JFrame f = new JFrame("peme");
^
tgrid.java:9: cannot find symbol
symbol : class GridLayoutPlus
location: class tgrid
GridLayoutPlus glp = new GridLayoutPlus(0, 3, 10, 10);
^
tgrid.java:9: cannot find symbol
symbol : class GridLayoutPlus
location: class tgrid
GridLayoutPlus glp = new GridLayoutPlus(0, 3, 10, 10);
^
tgrid.java:16: cannot find symbol
symbol : class JButton
location: class tgrid
f.add(new JButton(r+","+c));
^
5 errors