lcdui

Textbox on canvas in j2me

荒凉一梦 提交于 2020-01-15 09:23:06
问题 I am going to make application on j2me using canvas. I want to take textbox or textfield on my canvas. 回答1: You can draw a basic textbox and display a string , and when it receives focus, you can switch the view to that particular textbox ,something like this textBox = new TextBox(....); Midlet.display.setCurrent(textBox); This would create your data entry more robust and save you from the pain of implementing various keyboard issues yourselves 回答2: These items are only available for adding

In J2ME, How I obtain reference of all controls of the form to record form's controls state changes?

↘锁芯ラ 提交于 2020-01-03 03:24:08
问题 In my J2ME app, I want show an alert dialog box only when the user changes the state of any controls—that is, when the user uses any of the control of the form and then try to cancel the form without saving typed data. For example among all 5-6 controls of form if the user types in 1-2 textfields and tries to cancel the form without saving that typed data into database. An alert box should then display with the message "Save changes?" with Yes, No command. How to do this? This is my code

J2ME button command not working

会有一股神秘感。 提交于 2019-12-24 15:34:53
问题 I'm currently working on an j2me application and I'm having a hard time dealing with command button. Can someone please help me. The button was suppose to direct in a second form but when I click it, it's not working. Here's my code: import javax.microedition.midlet .*; import javax.microedition.lcdui .*; import javax.microedition.lcdui.StringItem; import javax.microedition.lcdui.TextField; import javax.microedition.lcdui.DateField; import javax.microedition.lcdui.Command; import javax

how to handle keypressed event in canvas for alphanumeric using j2me midp2.0?

你离开我真会死。 提交于 2019-12-22 18:13:11
问题 I am using canvas for drawing Strings in mobile screen based on the user input using key pressed event. Here my user wants to enter alphanumeric character like abc. For example user try to enter 'd' then it will display 3 instead of 'd'. So, do I get both String and numeric and able to draw in the mobile screen? 回答1: Na if you're doing it in Canvas, you'll need to implement your own typing. I guess you'll have a 2D array of characters for each number. [['a', 'b', 'c'], ['d', 'e', 'f']... You

Loading image in Java J2ME

此生再无相见时 提交于 2019-12-21 17:54:06
问题 I have a problem with loading image with java 2ME. I have a image file "picture.png" in location drive "C:". After that I wrote my like this to show image from this location. import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import java.io.*; public class ImageMidlet extends MIDlet implements CommandListener{ private Display display; private Command exitCommand; private Command backCommand; private Command okCommand; private Form form; private ImageItem imageItem; private

Desigining a Form in j2me [closed]

心不动则不痛 提交于 2019-12-20 08:00:08
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am trying to design a Form in J2ME without the use of Canvas class which has List like structure and an image as a Header. I want to add command button (OK) So by clicking on it ... i can choose a particular

Java ME help displaying calendar canvas from Nokia tutorial

浪尽此生 提交于 2019-12-14 03:28:31
问题 I've been following below tutorial on how to create a calendar widget in Java ME. I can't seem to get it to work. When I run the application it just says it's running in the background. I guess I'm not initializing it properly. Where exactly to put the code located at the bottom of the page to make it display to the java phone screen? The link to the tutorial is here apart from a few minor variable name differences the code is identical. http://www.developer.nokia.com/Community/Wiki/Building

Desigining a Form in j2me [duplicate]

删除回忆录丶 提交于 2019-12-13 18:08:17
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Desigining a Form in j2me I have created a Form with str 1 and str 2 as StringItem and added them on Form. Then i have added addCommand() method to str1 and str2 and when I click on Next button it should display an alert as Category 1 when clicked on category 1 and When category 2 when clicked on category 2 StringItem. Please suggest a solution What should I write in if loop of Command Action () method so that

How can I show dialog box on canvas in J2ME mobile application? [duplicate]

泄露秘密 提交于 2019-12-13 10:39:25
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Is this possible to use lwuit.Dialog with javax.microedition.lcdui.Canvas in wireless toolkit 2.5.2? I created a canvas to write contents when I press mobile keys(for Example if I press "A" it will be written on the screen using paint function). Now I want to show a dialog or PopUp window when I press any key from mobile. Is it possible to show dialog when am using Canvas? say some example, public class Mycanvas

Can I create a dialog box as seen in Blackberry using pure J2ME package

佐手、 提交于 2019-12-13 03:49:21
问题 I know we Alert is used as Pop up box in j2me but can I create a pop up as good looking as dialog box of Blackberry using pure j2me packages? Or I need to customize using Canvas class? Is there a dialog box in j2me? if yes can I get an example? 回答1: Dude, Just create one canvas with background image transparent and use another images for same like dialog box(images create from adobe Photoshop) , so this canvas you can use it anywhere in application. thanks 回答2: use d.show(); show method is