The above code didn't work, and playing with the prority and commandType also didn't help much. In particular, is it possible to group a list of options under a menu easily?
Well, when you are using the high level UI APIs, you have zero control in how it looks on the device, that is what the high level API is about, making the device be responsible for making it display in a nice mamner but device specific way.
You can use something like J2ME Polish to make a prettier UI.
There is no sense naming multiple commands with the same priority.
For example, assume a device has two softkeys and you want to display 4 commands. It should put the highest ranked command on one of the softkeys. The other key will display something like "menu" where the remaining 3 commands will appear.
Move that same application to a three softkey device and commands 1 and 2 will be visible while 3 and 4 will be under one key called "menu".
It's also possible that the JVM will simply ignore the priorities and put all the commands under a single "menu" key.
All of the above is purely conjecture on what is likely. As Mark pointed out, it's really up to the JVM and there are no guarantees.
I usually make a "static final" called lowPriority and set it to 99. Then I make a highPriority set to 1. When I start defining commands I use expressions like highPriority, highPriority+1, highPriority+2, or lowPriority, lowPriority-1, lowPriority-2, etc.