JAVA - LWUIT: Layout calculation problem

I have a rather large application written with LWUIT. With only a few screens that have the problem.

The problem:

When the page loads, everything looks fine. but when you scroll you can't scroll to the bottom, and when you click on a list it selects the item below where you clicked and not on where you clicked

However, when you click a select the list for a second time, all is fine. Also when a dialog pops up, after clicking it away, all is fine. And when I forget to call show() or repaint() he does not paint anything but when i try to scroll he shows() everything and he calculates it correctly.

I'm really puzzled about this problem. I'm searching on it for a long time now. And I would love to gain some new insights here.

This question and answers originated from www.stackoverflow.com
Question by (12/6/2010 3:26:34 PM)

Answer

After 5 days of searching on it, I finally found the solution. You have to call form.show() after you have added everything to your form. and not before, like I was doing.

Most of the time it works fine in both ways. Just not always.

Answer by

Find More Answers
Related Topics  java  mobile  java-me  lwuit
Related Questions
  • LWUIT Table Layout embedded TextAreas

    my goal is to display a Table through parsing an XML file. I'm using a SAX Parser and the content has multirows and I want the table width to fit to the display. Of course Y_AXIS scrolling would …
  • LWUIT : arabic font problem

    Hi how can i add arabic Characters to bitmap font and show in application ? how can i do it on localization section ? when i use system font it`s shows seprated and reserved on some phones , i want …
  • LWUIT : Form Problem

    i have started using LWUIT which sounds interesting , i have made a form and has simply added an image to its background , my problem is that the image is getting streched and looks bad :D is there …
  • Representing tables in the LWUIT browser

    I am trying to have a horizontally scrolling table within a HTMLComponent as the tables can be wider than the width of the mobile phone and I don't want the user to have a wrapped table. I set setSc…
  • about LWUIT supported mobiles

    Hey I have built a small application using LWUIT and I want to know which mobile devices does support LWUIT framework? Can anyone help me regarding this issue and share their knowledge.
  • LWUIT :Localization problem

    I have made a simple form with one textFeild and a command, I want to have two languages: Farsi and English so that I can use them according to my needs at runtime. I made some translations using…
  • How to capture images using LWUIt VIdeoComponent

    I have tried using MediaComponent , but since it is now deprecated it wont be good moving forward. Also i was not able to get it to re-size to full screen on the form. I am trying to use VideoCompon…
  • LWUIT 1.5 Table - horizontal spanning problem

    I am wondering if this is a bug or just my faulty code. I've been trying to render table with some horizontal spanning. This is how it should look like: In LWUIT 1.4 everything worked correct…
  • LWUIT List index problem and Is a bug of LWUIT List?

    I write j2me application that display list with labels and I add images to the labels and show it. I handle event for List with Action Listener. When I press label in List, event is handle by Action…
  • LWUIT ComboBox popup theming problem

    I want to customize the look of the ComboBox pop-up list in LWUIT. Nonetheless when I tried to change the ComboBox , ComboBoxFocus , ComboBoxItem , ComboBoxList , ComboBoxPopup components in LWUIT T…