lcdui

J2ME Soft Key Wrapper

你离开我真会死。 提交于 2019-12-04 07:42:22
Reading some articles, told me that soft keys varies between devices. Some says -6 or -21 for left soft key and -7 or -22 for right soft key. Given this situation, is there any good wrapper or function or best practice to handle it properly? If not possible for ALL devices, what is the best way to support most devices? with minor or no hack at all? To give you a feel for the scope of the problem have a look at this table of keycodes. Omermuhammed's approach is a good one if you are able to vary the JAD content depending on the target handset, for example by looking at the user-agent header

Image in button - j2me

让人想犯罪 __ 提交于 2019-12-02 11:04:50
问题 I am trying to build a simple menu-based GUI with J2ME. The menu entries are currently objects of classes derived from the class Button. Is there any way I can: Replace the text in the button and have an image show instead, sort of an icon? Make the text and image appear side by side on the same menu bar. If my question is not clear, please let me know and I will edit it. 回答1: You can create your own Item that looks like a button by extending the CustomItem class. This is a working MIDlet

Image in button - j2me

佐手、 提交于 2019-12-02 07:02:19
I am trying to build a simple menu-based GUI with J2ME. The menu entries are currently objects of classes derived from the class Button. Is there any way I can: Replace the text in the button and have an image show instead, sort of an icon? Make the text and image appear side by side on the same menu bar. If my question is not clear, please let me know and I will edit it. You can create your own Item that looks like a button by extending the CustomItem class . This is a working MIDlet with a good MyButton class: import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.CustomItem

JME: How to get the complete screen in WHITE without buttons, etc etc

别来无恙 提交于 2019-12-02 06:54:33
问题 Please have a look at the following code First, Please note I am a 100% newbie to Java Mobile. In here, I am making the light on and vibrate on when user click the button. However, I really wanted to create a SOS application which turn the whole screen into white, and go to black, like that, in the thread. I guess I didn't achieve that by this app because even the lights are on, the buttons are still there. I tried to turn the "Form" color to "white" but it seems like JME has no "Color" class

JME: How to get the complete screen in WHITE without buttons, etc etc

大兔子大兔子 提交于 2019-12-02 04:47:46
Please have a look at the following code First, Please note I am a 100% newbie to Java Mobile. In here, I am making the light on and vibrate on when user click the button. However, I really wanted to create a SOS application which turn the whole screen into white, and go to black, like that, in the thread. I guess I didn't achieve that by this app because even the lights are on, the buttons are still there. I tried to turn the "Form" color to "white" but it seems like JME has no "Color" class. import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class Midlet extends

How to lock the landscape mode in j2me app?

℡╲_俬逩灬. 提交于 2019-12-01 05:59:10
问题 I want to show my app only in portrait mode. I have to restrict the landscape mode in my app. There are separate attributes for each devices. For Nokia, Nokia-MIDlet-App-Orientation : Portrait . For Samsung, MIDlet-ScreenMode : Portrait . After adding these in JAD, I tried to install it in Nokia C5. I am unable to install it. I am getting Compulsory attribute missing error because custom JAD property shouldn't start with MIDlet- . I am unable to install it because of MIDlet-ScreenMode :

Displaying Alert with Yes, No Command

你离开我真会死。 提交于 2019-11-28 09:54:20
问题 At the J2me application I used an alert with yes, no command. If user clicks the yes command Form Screen will be displayed and if clicks the no command TextBox screen will be displayed. But the code does not work. For two command only textbox screen will be displayed. This is my code: public Login(){ yes=new Command("Yes",Command.OK,1); no=new Command("No",Command.CANCEL,1); alert=new Alert("","Save The Changes?",null,AlertType.CONFIRMATION); alert.setTimeout(Alert.FOREVER); alert.addCommand