(keitai-l) Problem in DoJa??

From: Reugene . <funk_docta_nl_at_hotmail.com>
Date: 12/19/03
Message-ID: <Law11-F120lBGIrIKm500052bd9@hotmail.com>
I'm busy making a menu in "Doja" I'm using a reference to help me, but I'm 
stuck and I have no idea how to continue. I put a menu in both of the 
classes. What I want to do is: if you click on options in the first 
menu(located in the first class) you go to the options menu(located in the 
second class). I know that I have to use the getSelectedIndex method, but 
how???

Can somebody give me a tip on how to do this?







This is a simplefied version of the code:

import com.nttdocomo.ui.*;

public class Test extends IApplication
{
  private HoofdMenu hoofdMenu;
  private OptionsMenu optionsMenu;


  public Test()
  {
    hoofdMenu = new HoofdMenu( "Main Menu" );
    optionsMenu = new OptionsMenu( "Options" );
  }

  public void start()
  {
    Display.setCurrent(  hoofdMenu );
  }
}




//Dit is de klasse van het hoofdmenu
class HoofdMenu extends Panel
{
  private ListBox main;

  public HoofdMenu( String titel )
  {
    setTitle( titel );

    main.append( "Options" );
    main.append( "Exit" );
    main.getSelectedIndex();

    add( main );
  }
}



//Dit is de klasse van het optionsmenu
class OptionsMenu extends Panel
{
  private ListBox options;

  public OptionsMenu( String titel )
  {
    options = new ListBox( ListBox.SINGLE_SELECT, 4 );
    options.append( "Geluid" );
    options.append( "Trilfunctie" );

    add( options );
  }
}

_________________________________________________________________
MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl
Received on Fri Dec 19 01:04:12 2003