Problem in Checkbox using array

Dear Everybody,

i want to make a Checkbox array.I write a code but it create some problem. Can anybody tell me what is the error of this code.

import java.awt.*;

public class FileDialogExample1 extends java.applet.Applet {

Checkbox [] cbg1 = new Checkbox[80];

cbg1[0]= new Checkbox("pappu");/// This is the error line

public void init() {

add(cbg1[0]);

}

public void paint(Graphics g) {

}

}

Please help me.......................

[510 byte] By [Pappowa] at [2007-11-26 17:36:01]
# 1
What does the compiler say?
bellyrippera at 2007-7-9 0:04:06 > top of Java-index,Java Essentials,Java Programming...
# 2

Compiler says

C:\Program Files\Xinox Software\JCreatorV4\MyProjects\test\src\test.java:16: <identifier> expected

cbg = new Checkbox[100];

^

C:\Program Files\Xinox Software\JCreatorV4\MyProjects\test\src\test.java:17: ']' expected

cbg[0].setLabel("pappu");

^

C:\Program Files\Xinox Software\JCreatorV4\MyProjects\test\src\test.java:17: invalid method declaration; return type required

cbg[0].setLabel("pappu");

^

C:\Program Files\Xinox Software\JCreatorV4\MyProjects\test\src\test.java:17: illegal start of type

cbg[0].setLabel("pappu");

^

C:\Program Files\Xinox Software\JCreatorV4\MyProjects\test\src\test.java:18: invalid method declaration; return type required

add(cbg[0]);

^

C:\Program Files\Xinox Software\JCreatorV4\MyProjects\test\src\test.java:18: ']' expected

add(cbg[0]);

^

6 errors

Process completed.

Pappowa at 2007-7-9 0:04:06 > top of Java-index,Java Essentials,Java Programming...
# 3
Give the FileDialogExample1 class a constructor.
pbrockway2a at 2007-7-9 0:04:06 > top of Java-index,Java Essentials,Java Programming...