aspose file tools*
The moose likes Java Micro Edition and the fly likes Horizantal image scroll in J2ME form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Horizantal image scroll in J2ME form" Watch "Horizantal image scroll in J2ME form" New topic
Author

Horizantal image scroll in J2ME form

Dushyant Chhetri
Ranch Hand

Joined: Oct 28, 2009
Posts: 75
Hi Friends,

I have been trying to figure out if J2ME javax.microedition.lcdui.Form allows for horizontal scrolling.

When form items are added to this form, and they exceed the form area, the vertical scrollbar appears automatically. This is not the case however when an ImageItem wider than the form is placed onto it. That is, if say the form on a Nokia mobile with a screen of 125x100 takes precisely those dimensions, and an ImageItem of 200x200 is placed on it. Vertical scrolling appears automatically, but not the horizontal.

I tried with resizing the image using the code snippet attached in this url.

Image zooming.

However the reduced size of the image makes it very hazy and unusuable thu si had to discard this option.
Now I desperately need to find a way to get the horizantal scroll work.

I know it can be done using Canvas class , but then my entire code will also change so please help me out with its implementation in a Form.

Thanks,
Aleksandar Babic
Ranch Hand

Joined: May 30, 2007
Posts: 68
This link might help
http://www.experts-exchange.com/Programming/Languages/Java/Q_20840864.html
(You must register to view the code. I could paste it here if you have problem with login)
Dushyant Chhetri
Ranch Hand

Joined: Oct 28, 2009
Posts: 75
Hi Aleksandar,

I tried the link below but as you mentioned I could not log in ti view the solution.

It would be very helpful if you would paste the code out here.

Thanks in advance..
Aleksandar Babic
Ranch Hand

Joined: May 30, 2007
Posts: 68
Here it is!

Dushyant Chhetri
Ranch Hand

Joined: Oct 28, 2009
Posts: 75
Thanks Aleksandar Babic.
It is working just the way I wanted it.
Aleksandar Babic
Ranch Hand

Joined: May 30, 2007
Posts: 68
Great! You're welcome
 
wood burning stoves
 
subject: Horizantal image scroll in J2ME form