How set scrolling only for BorderLayout.CENTER?

577 views Asked by At

I have top bar, list and bottom bar.

this.setLayout(new BorderLayout());
this.addComponent(BorderLayout.NORTH, bottomBar);
this.addComponent(BorderLayout.CENTER, list);
this.addComponent(BorderLayout.SOUTH, bottomBar);

List is very long. bottomBar and bottomBar is hide. Scrolling is on the full screen. How to make that scrolling was only for BorderLayout.CENTER. bottomBar and bottomBar will be visible.

1

There are 1 answers

1
bharath On BEST ANSWER

Disable the scrollable in the Form. For example do like this,

Form f = new Form();
f.setLayout(new BorderLayout());
f.setScrollable(false);
f.addComponent(BorderLayout.NORTH, new Label("Top bar"));
f.addComponent(BorderLayout.CENTER, list);
f.addComponent(BorderLayout.SOUTH, new Label("Bottom bar"));
f.show();