• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Image rendering on a Form

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am trying to left align an Image on a form but it ALWAYS shows up on the right. The Code is
Form frmLogin = new Form("AMOS Login");
Image img ;
try{
img = Image.createImage("/midp/uidemo/anl.png");
frmLogin.append(new ImageItem,"",img,ImageItem.LAYOUT_LEFT,""));
}
catch(Exception ex){
frmLogin.append("Cannot Load Image");
}
When displayed on the Palm, it looks like the layout is meaning less. The image is on the right all the time. Any ideas how to get it on the RIGHT??
Tx!
Bob....
 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bob,
This is a quote from the MIDP docs about the Layout:


The value of the layout field is merely a hint. Because of device constraints, such as limited screen size, the implementation may choose to ignore layout directions.


Have you tried with a really small image(2x2 pixels) to see what happens?
Bye,

------------------
Terry Doyle
Sun Certified Programmer for Java 2 Platform
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All I want to do is show a rectangle on a form with a textfield and buttons and everything else. I want Text to be displayed within the rectangle as well. How can I do this? What is the code for it?
Ankur

Originally posted by Robert Hendry:
Hello,
I am trying to left align an Image on a form but it ALWAYS shows up on the right. The Code is
Form frmLogin = new Form("AMOS Login");
Image img ;
try{
img = Image.createImage("/midp/uidemo/anl.png");
frmLogin.append(new ImageItem,"",img,ImageItem.LAYOUT_LEFT,""));
}
catch(Exception ex){
frmLogin.append("Cannot Load Image");
}
When displayed on the Palm, it looks like the layout is meaning less. The image is on the right all the time. Any ideas how to get it on the RIGHT??
Tx!
Bob....


 
Can't .... do .... plaid .... So I did this tiny ad instead:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic