import javax.microedition.lcdui.*; public class TimePanel implements CommandListener { static List panel; static Command ok; static TimePanel () { } static void start () { String menuPanel[] = {"OCT 26 1985 01:24","NOV 05 1955 06:00","OCT 26 1985 10:35","OCT 21 2015 16:29","OCT 26 1985 21:00","NOV 12 1955 06:00","SEP 2 1885 11:00","OCT 27 1985 11:00"}; panel = new List("Select date:", List.IMPLICIT, menuPanel, null); ok = new Command("OK", Command.OK, 1); panel.addCommand(ok); panel.setCommandListener(this); display.setCurrent(panel); } public void commandAction (Command c, Displayable d) { if (c==ok && d==panel) { int selIndex = menu.getSelectedIndex(); switch(selIndex) { case 0: future.Month = 10; future.Day = 26; future.Year = 1985; future.Hour = 01; future.Minute = 24; display.setCurrent(game); break; case 1: future.Month = 11; future.Day = 05; future.Year = 1955; future.Hour = 06; future.Minute = 00; display.setCurrent(game); break; case 2: future.Month = 10; future.Day = 26; future.Year = 1985; future.Hour = 10; future.Minute = 35; display.setCurrent(game); break; case 3: future.Month = 10; future.Day = 21; future.Year = 2015; future.Hour = 16; future.Minute = 29; display.setCurrent(game); break; case 4: future.Month = 10; future.Day = 26; future.Year = 1985; future.Hour = 21; future.Minute = 00; display.setCurrent(game); break; case 5: future.Month = 11; future.Day = 12; future.Year = 1955; future.Hour = 06; future.Minute = 00; display.setCurrent(game); break; case 6: future.Month = 9; future.Day = 2; future.Year = 1885; future.Hour = 11; future.Minute = 00; display.setCurrent(game); break; case 7: future.Month = 10; future.Day = 27; future.Year = 1985; future.Hour = 11; future.Minute = 00; display.setCurrent(game); break; } } } }