Questions tagged [lwuit-command]

LWUIT includes the concept of a command. A command is something that your user can do in your application.

LWUIT includes the concept of a command. A command is something that your user can do in your application. LWUIT decides how to show the command on the screen and how the user makes it happen. Usually, commands are assigned to the soft buttons on a mobile phone. LWUIT will normally show commands as labels at the bottom corners of the screen; the user can invoke them by pressing the corresponding soft button. On touch devices, the user can touch directly on a command to invoke it.

Command(java.lang.String command) 
          -Creates a new instance of Command
Command(java.lang.String command, Image icon) 
          -Creates a new instance of Command
Command(java.lang.String command, Image icon, int id) 
          -Creates a new instance of Command
Command(java.lang.String command, int id) 
          -Creates a new instance of Command

Create a command,

 Command exitCommand = new Command("Exit");

Add the command to the form,

f.addCommand(exitCommand);

Set the command Listener to the form, should provide an action listener,

f.setCommandListener(myActionListener);
7 questions
2
votes
2 answers

Softbuttons not responding after overriding keypressed and keyreleased

I am developing an application that requires me to override keypressed and released methods in lwuit so as to map specific functons into gamekeys. The gamekeys work fine when I do this but I'm having trouble adding more than two commands to…
2
votes
1 answer

LWUIT - Adding 3 Commands and how to get events from them?

I was working with Command Component with LWUIT to develop small Midlet applications there was a situation where i had to have three commands helping me to go to different forms. Display.getInstance().setThirdSoftButton(true); definetly helped in…
1
vote
1 answer

back button in lwuit with blackberry

I developed an mobile application using LWUIT and it works fine in devices with J2ME. I want to run the same application in Blackberry also. I saw some samples about LWUIT on Blackberry but none of them answered me. How can I handle the back button…
nhr
  • 15
  • 2
1
vote
1 answer

Back Command´s modification in LWUIT

This is my first question. I will try to be clear. I need to make a back command in LWUIT that allows me to go back to a previous form and pass some parameters for some modifications of the form. I can not use the Form.getBackCommand() because it…
Mun0n
  • 4,438
  • 4
  • 28
  • 46
1
vote
1 answer

my commands using lwuit not working properly ..

I am trying to move between 3 forms. 1 is main form and 2 other simple forms. I have commands in the soft keys but they are not working... below is my code... public class checkOutComponents extends MIDlet implements ActionListener { private…
0
votes
1 answer

How to call Exit Command when I press Key # in Lwuit Mobile Application?

Can I assign the Exit Command to the # key in an Lwuit Application? When I press the key #, the Exit command should be called automatically and exit the application.
Shankar
  • 31
  • 8
0
votes
1 answer

lwuit video component floats over commands

My LWUIT video component floats over my commands. Any idea how I can fix this? My code is below. public void showQuickProfileForm() { Form f = new Form(); VideoComponent videoComponent = null; try { videoComponent =…
sammyukavi
  • 1,501
  • 2
  • 23
  • 51