Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MIDP: Location for Command buttons

 
Choon-Chern Lim
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I developed 2 test apps and deployed them in my PDA's pocket pc. One app is a form with some items and another app that extends gamecanvas (it's a sokoban game! ). Both apps have at least 3 commands, most of them are "Command.OK", and I append the commands to both form and gamecanvas.

When I view the form app, the commands stack under a pulled-up "Menu" on the bottom right screen.

As for the gamecanvas app, some of the commands show up as buttons in the bottom left canvas. It seems to fit only to the middle of the screen. The left-over commands are stacked under pulled-up "Action" on bottom left screen.

Is there a way to manually position the commands? I feel like I don't have too much control on where to put the commands.

Thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly, Commands are high level GUI api objects, so therefore the device determines where they are put, and you can't change that.

Now you can create your own custom objects and paint them where you want.

Another suggestion is to use J2ME Polish's GUI which makes nice pretty Commands and you can tell it to put it on the bottom, not with the hot keys like the stacked menu you have found.

Hope that helps.

Mark
 
Choon-Chern Lim
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Mark,

I was browsing through J2ME Polish quickly, and it seems like it's not part of Sun's JSR.

I'm a little confused on how it works. Does J2ME Polish shares the same functionalities as MIDP? Or do I add Polish jars to my existing jars?

I'm currently using Sun's Wireless Toolkit(WTK) for building and running the application in the emulator. Do I still use WTK for Polish or does it have its own GUI thing?

Thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Polish is kind of a wrapper, it does pre-compiler inserting and "removing" of code so that you can add more functionality, have a jar file that only has code for your particular device selections, etc. There are a lot to it. It also has a way to make a more "Polished" GUI, which includes prettier ways to make Commands.

Mark
 
Choon-Chern Lim
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark. I'll do more research on that, and perhaps try a test app on that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic