Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User sara mukhtar's Avatar
    Join Date
    Jun 2011
    Posts
    5
    Hi,
    I have added image in a button in my j2me project using lwuit.My problem is that the image appeared at the corner of the button and it is not center aligned .kindly tell me how to align the image in center.

  2. #2
    Registered User kis_spn's Avatar
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128
    Hi,

    you will need to set component alignment...like as:

    Image image = Image.createImage("/res/abc.png");
    Label text = new Label(image);
    text.setAlignment(Component.CENTER);
    ....................................

  3. #3
    Registered User sara mukhtar's Avatar
    Join Date
    Jun 2011
    Posts
    5
    thanks alot.It worked

Similar Threads

  1. Replies: 2
    Last Post: 2011-01-18, 12:01
  2. problem in display an image button on canvas(Background image)
    By mramin05 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2008-11-12, 04:51
  3. right alignment of text in navigation pane
    By himsymbian in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-10-07, 08:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved