iam trying to create a simple menu.Iam getting an error in the
createMenu function.Though i have declared mnuCount as integer it 's
been recognized as an menu.Cansomebody help
------------------------------
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import java.io.*;
public class Student extends Frame
{
private static MenuBar mnuBar;
private Menu mnuName ;
private static int mnuCount = 0;
private String regMenu[]={ "Add/Drop","LookUp","-","View
Schedule","Course Info"};
private String accMenu[]={ "Account Summary","Fee
Deadline","-","Refund Status"};
private String recMenu[]={ "Check Holds","-","View
Grades","Transfer Credit"};
private String pinMenu[]={ "Change Address","Change
Telephone No","Change Password"};
private String exMenu[]={ "Logout"};
public Student()
{
super("Student Interface");
inits();
createMenu ("Registeration",regMenu);
createMenu ("Student Accounts",accMenu);
createMenu ("Student Records",recMenu);
createMenu ("Personal Information Menu",pinMenu);
createMenu ("Exit",exMenu);
show();
setBounds(0,0,800,600);
}
private void inits()
{
//mnuBar = new MenuBar();
//setMenuBar(mnuBar);
show();
setBounds(0,0,800,600);
}
private void createMenu(String mnuTmpName,String mnuTmpItem
[])
{
MenuItem m;
mnuBar.add(mnuName [mnuCount]= new Menu(mnuTmpName));
for(int i=0;i<mnuTmpItem.length;i++)
{
mnuName [mnuCount].add(m=new MenuItem
(mnuTmpItem[i]));
}
mnuCount++;
}
}