Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Focusing on a Form Item

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I'd like my MIDlet Form to focus on a specific Item it contains.

I have a Gauge which I increase or decrease, and each time I modify it I re-set the screen by calling a method which shows the Form.

This is the ItemStateListener and the method it invokes. I don't paste the showDevice method because it's quite long and I don't think it's needed to help me.





I don't know if this is the appropiate way to do this (I don't think so), but it's the one I've come to. Any advice is welcome

Anyway, the Gauge is suposed to be modified many times, and right now it's annoying because each time I modify it, the Form focuses on its first element. Then I have to go down to the gauge, modify it, go again down to the gauge, etc. The gauge is the fifth item shown and it has to be there, so placing it first isn't an option.

Thanks in advance, I hope I explained myself correctly.
 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might have already got the solution somewhere till now and this reply may be too late for you..

But if you have not, try using display.setCurrentItem( item ), just after your setCurrent() call.

- Ramy..
[ October 13, 2006: Message edited by: Ramender Mall ]
 
ranger
Posts: 17344
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Maragues"

Please click on the My Profile link above and change your display name to match the JavaRanch Naming Policy of using your real first and real last names.

Thanks

Mark
 
Miguel Aragues
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Ramender!! It's not too late yet

And sorry for the inconvenience caused by my name, I wasn't aware of that policy.
 
today's feeble attempt to support the empire
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!