[急]黑莓向可滚动的VerticalFieldManager添加ButtonField,导致屏幕错误

[急]黑莓向可滚动的VerticalFieldManager添加ButtonField,导致屏幕异常

package com.test;

import net.rim.device.api.system.Display;
import net.rim.device.api.ui.Color;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.FieldChangeListener;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.container.HorizontalFieldManager;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.container.VerticalFieldManager;

public class ManagerScreen extends MainScreen {

private VerticalFieldManager bodyManager,b1,b2,b3,b4,b5,b6;
private ButtonField bt1,bt2,bt3,bt4,bt5,bt6;
private ButtonField bt11,bt22,bt33,bt44,bt55,bt66;
private int i;

public ManagerScreen() {
HorizontalFieldManager t = new HorizontalFieldManager(){
protected void paintBackground(Graphics g) {
// TODO Auto-generated method stub
g.setColor(Color.GRAY);
g.fillRect(0, 0, Display.getWidth(), Display.getHeight()/4/2);
super.paintBackground(g);
}
protected void sublayout(int maxWidth, int maxHeight) {
// TODO Auto-generated method stub
maxWidth = Display.getWidth();
maxHeight = Display.getHeight()/4/2;
super.sublayout(maxWidth, maxHeight);
setExtent(maxWidth, maxHeight);
}
};

HorizontalFieldManager f = new HorizontalFieldManager(){
protected void paintBackground(Graphics g) {
// TODO Auto-generated method stub
g.setColor(Color.GRAY);
g.fillRect(0, 0, Display.getWidth(), Display.getHeight()/4/2);
super.paintBackground(g);
}
protected void sublayout(int maxWidth, int maxHeight) {
// TODO Auto-generated method stub
maxWidth = Display.getWidth();
maxHeight = Display.getHeight()/4/2;
super.sublayout(maxWidth, maxHeight);
setExtent(maxWidth, maxHeight);
}
};

bodyManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL|Manager.VERTICAL_SCROLLBAR){
protected void sublayout(int maxWidth, int maxHeight) {
// TODO Auto-generated method stub
maxWidth = Display.getWidth();
maxHeight = Display.getHeight()-Display.getHeight()/4;
super.sublayout(maxWidth, maxHeight);
setExtent(maxWidth, maxHeight);
}
};
bt1 = new ButtonField("bt1",ButtonField.CONSUME_CLICK);
bt11 = new ButtonField("bt11",ButtonField.CONSUME_CLICK);
bt2 = new ButtonField("bt2",ButtonField.CONSUME_CLICK);
bt22 = new ButtonField("bt22",ButtonField.CONSUME_CLICK);
bt3 = new ButtonField("bt3",ButtonField.CONSUME_CLICK);
bt33 = new ButtonField("bt33",ButtonField.CONSUME_CLICK);
bt4 = new ButtonField("bt4",ButtonField.CONSUME_CLICK);
bt44 = new ButtonField("bt44",ButtonField.CONSUME_CLICK);
bt5 = new ButtonField("bt5",ButtonField.CONSUME_CLICK);
bt55 = new ButtonField("bt55",ButtonField.CONSUME_CLICK);
bt6 = new ButtonField("bt6",ButtonField.CONSUME_CLICK);
bt66 = new ButtonField("bt66",ButtonField.CONSUME_CLICK);