• 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

How to use setLayout in Item class?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to place a StringItem in the bottom of a form.
I try this:
mMessage = new StringItem(null, "");
mMessage.setLayout(Item.LAYOUT_BOTTOM);
But i get this from the compiler:
cannot resolve symbol variable LAYOUT_BOTTOM

Is there anyone who knows how to use this metode?

-Martin

[ November 29, 2004: Message edited by: martin filton ]
[ November 29, 2004: Message edited by: martin filton ]
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
haven't tried it
but just try this
instead of Item.LAYOUT_BOTTOM
try StringItem.LAYOUT_BOTTOM
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The method setLayout() and LAYOUT constants were added in MIDP 2.0. If you're compiling with MIDP 1.0 I would expect to get this error, but I would also expect to get an error because of the presence of the call to setLayout(), regardless of the parameters you pass to it.

Also you would get errors on setLayout() and LAYOUT_BOTTOM if those lines of code are outside a method (but within a class).
[ November 30, 2004: Message edited by: Tomas Conway ]
 
martin filton
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have some stringitems that I want to have on their own line:
STRINGITEM1
STRINGITEM2
STRINGITEM3

Here is what I try to do:


Is it posible to do somthing like this?

-Martin
 
martin filton
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just added:
StringItem it = new StringItem(null, subskjerm+"\n",Item.BUTTON);
 
Good night. Drive safely. Here's a tiny ad for the road:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic