×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    125

    LWUIT 1.3 : bad form refresh

    Hi,

    I have a LWUIT midlet with just one form which contains a TabbedPane with two tabs (one container - composition of components - for each tab).

    The phone screen is smaller than the form so to see all the components, the use of automatic scroll (when using the down and up keys) is mandatory.

    So when I don't use theme, the form is correctly painted even when the position of the scroll changed.

    But when I use a theme (LWUITtheme.res : the theme which is given with the LWUITdemo midlet), when I go to the component outside the screen (but in the form) only the first displayed part of the form is drawn, the next components are not drawn (there is a clear area) ?

    Do you know this problem ?

    Thanks

  2. #2
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    125

    Re: LWUIT 1.3 : bad form refresh

    Hi,

    More informations, this problem not depends according to add or not a theme but according to the version of LWUIT...

    I use the SUN J2ME SDK (sun_java_me_sdk-3_0-win.exe) which includes directly LWUIT library... And with this version the components are correctly painted during the scroll...

    If I take the LWUIT.jar of the 1.2.1 or 1.3 version, the components are not correctly painted during the scroll...

    Do you have an idea ?

    Thanks

  3. #3
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    125

    Re: LWUIT 1.3 : bad form refresh

    package hello;

    import com.sun.lwuit.Button;
    import com.sun.lwuit.Container;
    import com.sun.lwuit.Display;
    import com.sun.lwuit.Form;
    import com.sun.lwuit.TabbedPane;
    import com.sun.lwuit.layouts.GridLayout;
    import javax.microedition.midlet.*;

    public class HelloMIDlet extends MIDlet {

    private void definirForm(Form form, int nbl) {

    Container cont = new Container();
    cont.setLayout(new GridLayout(nbl, 1));
    for (int ind = 0; ind < nbl; ++ind) {
    cont.addComponent(new Button("Ligne " + (ind + 1)));
    }
    TabbedPane tabb = new TabbedPane(TabbedPane.TOP);
    tabb.addTab("Choix", cont);
    form.addComponent(tabb);
    }

    public void startApp() {
    try {
    Display.init(this);
    Form form = new Form();
    definirForm(form, 20);
    form.show();
    } catch (Exception e) {
    System.out.println(e.toString());
    }
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
    }

    Try this code with the LWUIT library directly contained int the <sun_java_me_sdk-3_0-win.exe>.

    Next download the LWUIT 1.3 and remove the origianl LWUIT library and add the new LWUIT.jar; then try to run again this midlet and you will see the difference...

    It seems this problem came from a bug (or from an error in my code) in TabbedPane !!!

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: LWUIT 1.3 : bad form refresh

    Quote Originally Posted by frasene View Post
    I use the SUN J2ME SDK (sun_java_me_sdk-3_0-win.exe) which includes directly LWUIT library... And with this version the components are correctly painted during the scroll...

    If I take the LWUIT.jar of the 1.2.1 or 1.3 version, the components are not correctly painted during the scroll...

    Do you have an idea ?
    I don't use LWUIT, so I don't know what the problem is. However... if the version in the Java ME SDK 3.0 works, then perhaps you should just use that?

    Graham.

  5. #5
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    125

    Re: LWUIT 1.3 : bad form refresh

    On the sun_java_me_sdk-3_0-win.exe this is the fist version of LWUIT... The new versions 1.2 and 1.3 are not beta and my code is very simple so I suppose I have made a simple mistake in my code... That's why I hope someone find the error in my code or confirm the bug...

    The use of the last version is interesting because there are new components like Table, Tree, the speed is improved, there are some virtual keyboards... I think LWUIT is interesting for Nokia and Midp Phones generally...

    Thanks
    Last edited by frasene; 2010-02-02 at 21:46.

  6. #6
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    125

    Re: LWUIT 1.3 : bad form refresh

    This problem is corrected with using the "setScrollable" method on form, tabbedpane et container...

    When adding this in the code :

    form.setScrollable(false);
    tabbedpane.setScrollable(false);
    container.setScrollableY(true);
    container.setScrollableY(false);

    It run on the all versions...

    Bug ?

  7. #7
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: LWUIT 1.3 : bad form refresh

    Did you have a look in the LWUIT issues database?

  8. #8
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    125

    Re: LWUIT 1.3 : bad form refresh

    No, I haven't seen in the LWUIT issue database...

    Next time, I will see...

    Thanks for the link.

Similar Threads

  1. LWUIT 1.3 on N73
    By frasene in forum Mobile Java General
    Replies: 1
    Last Post: 2010-01-30, 07:26
  2. Qt Designer form bad display
    By albertux7 in forum [Archived] Qt SDKs and Tools
    Replies: 1
    Last Post: 2010-01-17, 20:02
  3. How to use replace method of LWUIT form?
    By neeraja.nokia in forum Mobile Java General
    Replies: 0
    Last Post: 2009-01-24, 04:24
  4. Form troubles
    By matdodgson in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-12-06, 10:49
  5. How to refresh a Form?
    By ferenc.pataki@freemail.hu in forum Mobile Java General
    Replies: 3
    Last Post: 2004-09-29, 05:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •