这是我的代码:
public Form getMenuForm()
{
if ( menuForm == null )
{
Form menuForm = new Form( "Tracking Main Menu" );
menuForm.setLayout( new BoxLayout( BoxLayout.Y_AXIS ) );
menuForm.setScrollable( true );
menuForm.setScrollableY( true );
menuForm.addComponent( this.getMenuList() );
for(int i=0;i<30;i++)
{
Label lblTest = new Label("hello guys");
menuForm.addComponent( lblTest );
}
menuForm.addCommand( new Command( "Exit" ) );
menuForm.setTransitionOutAnimator( CommonTransitions.createSlide( CommonTransitions.SLIDE_HORIZONTAL, true,
200 ) );
menuForm.addCommandListener( this );
}
return menuForm;
}
public List getMenuList()
{
String[] menuItems = { "Find Person", "Person Registration", "Message", "Setting" };
if ( menuList == null )
{
menuList = new List( menuItems );
menuList.setListCellRenderer( new DefaultListCellRenderer( false ) );
menuList.setSmoothScrolling( true );
menuList.setFixedSelection( List.FIXED_NONE );
menuList.addActionListener( this );
}
return menuList;
}
我只能选择列表的 4 个选项,并且无法向下滚动查看屏幕底部。我在这里错过了什么吗,请帮助我...