• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GUI in J2ME

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am using forms with GUI components on Palm devices. It seems that there is no Layout Management. Is there a way I can specifiy x/y coordinates for (say) when I add a Textbox or Images?
Tx!
Bob...
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot specify the location of a TextBox, but you can ask where to display an image, though.
Use the static field members of the ImageItem class, that is:
- ImageItem.LAYOUT_CENTER // horizontally centers the image
- ImageItem.LAYOUT_DEFAULT // uses the default formatting of the container
- ImageItem.LAYOUT_LEFT // draws the image close to the left border of the drawing area
- ImageItem.LAYOUT_NEWLINE_AFTER // everything drawn after the image comes under the image
- ImageItem.LAYOUT_NEWLINE_BEFORE // the image is automatically drawn under a preceding text
- ImageItem.LAYOUT_RIGHT // draws the image close to the right border of the drawing area
Be aware, though, that those constraints are only hints and they may be ignored by the underlying implementation.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for that information Valentin. This concerns me because I am looking at a table layout for the GUI of a PDA-based software product. The easiest comparison I can make would be a high-speed rating system.

The user must only tap their stylus in the correct column for each person, thus allowing the fastest possible entry of information.
The way you explained the ImageItem constants, it seems I would not be able to rely on J2ME to place my user interface elements exactly where I want them. Help?
 
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would probably try investigating the ChoiceGroup class in package javax.microedition.lcdui which provides such functionalities. I'm not sure that you may be able to achieve your goal, though, but it sure is worth trying.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic