1

I can not set scrollale for center component. But NORTH and SOUTH have to be fixed.

this.setLayout(new BorderLayout());
this.setScrollable(false);
this.addComponent(BorderLayout.NORTH, top);
scrollWrap.setScrollable(true);
this.addComponent(BorderLayout.CENTER, scrollWrap);
this.addComponent(BorderLayout.SOUTH, bottom);

What is the problem?

Tim
  • 1,606
  • 2
  • 20
  • 32

1 Answers1

1

I'm assuming this code is in a subclass of Form? What specifically isn't working? Do you intend to enable scrolling on both X & Y? Are you adding components into the container? Scroll will only work if you add components into the scrollWrap container

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • Yes, it is subclass of Form. I add in scrollWrap some continers and want scrollWrap is scrollable. But it isn't work. I NORTH and SOUTH is normal but CENTER is partially visible. – Tim May 14 '12 at 06:56
  • Did you try setScrollableY(). Did you invoke this code on the EDT? What exactly are you seeing? I suggest you use screenshots to illustrate your issue – Shai Almog May 16 '12 at 12:09