Need help in adding no of buttons in java.
I have to add no's of buttons in applet.
But i did not able to add this.Check this code.
import java.awt.*;
import javax.swing.*;
/*<APPLET CODE="kk.java" HEIGHT=300 WIDTH=400></APPLET>*/
public class kk extends JApplet
{
int i;
public void meth()
{
JButton b[]=new JButton[20];
}
public void init()
{
meth();
setLayout(new FlowLayout());
for(i=0;i<5;i++)
{
add(b);
}
}
}