File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes positioning the lable in palm's screen using j2me?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "positioning the lable in palm Watch "positioning the lable in palm New topic
Author

positioning the lable in palm's screen using j2me??

eric sato
Ranch Hand

Joined: Oct 01, 2002
Posts: 37
hi all,
I'm quite new using j2me in palm. Does anyone of you has idea, how to adjust the position of the StringItem in palm screen? i'm understand that the StringItem's title will be on left justified and text will be on right, but i want it full control on it. i need to control the full screen on palm.
Thanks in advance.
sato


If you can't change the direction the the wind, change your sail.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
MIDP handles the layout for all of the high level GUI components. You may be able to do something with a Canvas, but I haven't tried it.


Matthew Phillips
Pavlin Mihalev
Greenhorn

Joined: Apr 29, 2003
Posts: 28
Hello,
I am supposing that you wish to center the StringItem on the screen ? Maybe you should calculate the width of the String
Font font = Fong.getDefault(); // or your font
it str_w = font.stringWidth( yourStringItem.getLabel() ); // or getText ot both
so with this info in mind you can add additional space before and after to adjust the position. If you are dealing with a Form you can add directly the String - that gives you more freedom to operate it.
Hope this helps,


------<br />www.beiks.net
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: positioning the lable in palm's screen using j2me??
 
Similar Threads
J2ME extensions for Palm OS
Palm hotsync
How to enable Palm Keyborad....?????
Totally ignorant (about J2ME)
Hi friends...pls go thru this and prove MicroJava is great