Click here to Skip to main content
11,717,914 members (83,254 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Java J2ME
I am working on J2ME Aplication using LWUIT.Now i have to create a form having four image buttons in 2x2 matrix.That i did using GridLayout but how to resize the image Buttons according to the Screen size of Mobile using LWUIT toolkit?Also i want to know how to use the concept of Tooltip in J2ME as it is not available in J2ME?
Posted 22-Oct-12 0:54am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

make it relative: get the screen resolution and make up the buttons size according to that.

// logic code - not usable!
ScreenWidth wide = 200;
button.setSize((int)(wide*0.2), (int)(wide*0.2)); // cast the double to int | Button will be 20% of screen width
Akanksha Raina at 23-Oct-12 3:11am
thnx.Will you please tell me how to use Tooltip in case of J2ME as it is not directly available in J2ME.So,how to use this?
TorstenH. at 23-Oct-12 5:00am
No sorry, J2ME is not my thingy.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 849
1 OriginalGriff 215
2 F-ES Sitecore 210
3 Maciej Los 140
4 Jochen Arndt 120
0 Sergey Alexandrovich Kryukov 1,494
1 OriginalGriff 535
2 Maciej Los 529
3 Richard MacCutchan 440
4 CHill60 415

Advertise | Privacy | Mobile
Web04 | 2.8.150901.1 | Last Updated 22 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100