Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Horizantal image scroll in J2ME form

 
Dushyant Chhetri
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here it is!

 
Dushyant Chhetri
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Aleksandar Babic.
It is working just the way I wanted it.
 
Aleksandar Babic
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great! You're welcome
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic