JAVA ME - 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 any way to set an image not to get stretshd on a form or any other component? please help me regarding this issue.

regard Aida

This question and answers originated from www.stackoverflow.com
Question by (7/27/2011 6:31:24 PM)

Answer

This depends on the version of LWUIT you are using. In 1.4 you could define bgType in the Style to be BACKGROUND_IMAGE_ALIGNED and then define the bgAlign value to whatever you want (there are many types/alignments).

The latest SVN and upcoming 1.5 simplifies this by removing bgAlign and adding to bgType all the alignment/tiling possibilities e.g. BACKGROUND_IMAGE_TILE_VERTICAL_ALIGN_RIGHT or BACKGROUND_IMAGE_ALIGNED_TOP_LEFT etc...

You can edit all of these visually in the resource editor using the theme.

Answer by

Find More Answers
Related Topics  java-me  lwuit
Related Questions
  • 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: 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 scro…
  • Switching between LWUIT Form and LCDUI Form

    I have built a LWUIT UI class which contains the Midlet. I am basically using a theme from this midlet. But I need to jump to another LCDUI form which contains some LCDUI controls and I need to set …
  • How to make it possible to add a LWUIT Form inside a LWUIT Form?

    I tried to add a LWUIT Form into another LWUIT Form but I received an internal error in runtime : Installing suite from: http://127.0.0.1:1975/SmartPhoneBanking.jad java.lang.IllegalArgumentExcep…
  • How to refresh the lwuit form?

    I am working in a project in which user fills a questionnaire and the answers are then submitted to the server. For simplicity I have just kept two questions per screen and after clicking on the nex…
  • 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…
  • 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…
  • How to remove the Title-bar of a LWUIT Form?

    In the actionPerformed of a Button I want to remove the Title-bar of the actual LWUIT Form . How to achieve that? And how to redisplay it again after a certain action has been complete?
  • Menu Bar Height in the LWUIT Form

    application develop in the J2ME using LWUIT.when i port this application on the Samsung Device it create following problem. int h = Display.getInstance().getDisplayWidth(); It returns 388 for…
  • 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…