Menus and subMenus

i want to make menus using switch case break thing .. and i want to make submenu branched from the original like ..

the main menu:

1. Load Data File

2. Save Data File

3. Edit Project

4. Edit Task

5. Generate Report

and when we select edit project,for example, another menu should output like in my case:

1. insert new project

2.delete project

how can this be done .. ? .. i want some1 to help me coding this menu interface .. i mean i want the code for this software which only shows menus and the same thing i explained previousely should happen without doin' what it shoud do (deleting, adding..etc)

public static void main(String[]args)throws IOException

{/*

int cho;

do{

System.out.println();

System.out.println("1. Load Data File");

System.out.println("2. Save Data File");

System.out.println("3. Edit Project");

System.out.println("4. Edit Task");

System.out.println("5. Generate Report");

System.out.println("6. Terminate The Program");

System.out.println();

cho=Integer.parseInt(std.readLine());

switch(cho)

{

case 1:

loadDataFile();

break;

case 2:

saveDataFile();

break;

case 3:

editProject();

break;

case 4:

editTask();

break;

case 5:

geneReport();

break;

}

}

while(cho!=6);

}*/

}

}

[1480 byte] By [DaVeeCka] at [2007-11-27 3:59:07]
# 1

The forum isn't really here to guide you through writing your applications (that's what books and tutorials are for), it's to help you when you get stuck on something. Had you followed a tutorial, you'd know how to do this, ergo you aren't actually stuck, you just haven't tried anything yet

georgemca at 2007-7-12 9:03:36 > top of Java-index,Java Essentials,New To Java...