Search code examples
java-melwuit

LWUIT scroll jumping issue


I need to show the only component on the form - HTMLComponent. Reaching the bottom of the form/component while vertical scrolling scroll bar jumps back to the top of the form. I need to prevent this.

I've tried to turn on/off scrolling on the form and HTMLComponent but anyway if there's a scroll bar - it will return to the top from the bottom. Also I've tried border and box layouts and additional container for HTMLComponent - no use.

Any ideas how to prevent such scrolling issue?


Solution

  • Try this (it works for me - LWUIT 1.5):

    htmlComponent.getComponentForm().setCyclicFocus(false);
    

    If you get a NullPointerException, call it after adding to the HtmlComponent to a form.