lwuit

HashTable to Lwuit Table

回眸只為那壹抹淺笑 提交于 2019-12-25 03:52:43
问题 Hashtable iHashtable=new Hashtable(); iHashtable.put("Name", "Jhon"); iHashtable.put("Address","India"); Enumeration iEnumeration=iHashtable.keys(); while(iEnumeration.hasMoreElements()) { Object iresult1=iEnumeration.nextElement(); String iresult2=(String) iHashtable.get(iresult1); System.out.println(iresult1); System.out.println(iresult2); My problem is I want to put the value at LWUIT table dynamically using the HashTable key and value,here is iresult1 and iresult2,using the key and value

HashTable to Lwuit Table

独自空忆成欢 提交于 2019-12-25 03:51:08
问题 Hashtable iHashtable=new Hashtable(); iHashtable.put("Name", "Jhon"); iHashtable.put("Address","India"); Enumeration iEnumeration=iHashtable.keys(); while(iEnumeration.hasMoreElements()) { Object iresult1=iEnumeration.nextElement(); String iresult2=(String) iHashtable.get(iresult1); System.out.println(iresult1); System.out.println(iresult2); My problem is I want to put the value at LWUIT table dynamically using the HashTable key and value,here is iresult1 and iresult2,using the key and value

Custom creation of cells in a LWUIT Table in J2ME

ⅰ亾dé卋堺 提交于 2019-12-25 03:36:45
问题 I am trying to create a LWUIT Table in my J2ME application where all cells in one column are of a particular type e.g. TextField taking decimal input. Could anyone please suggest of achieving this or even another approach I could take? 回答1: I was looking in the wrong area. Instead of using ListCellRenderer I extended the Table object and overrode the createCell method. public class CustomTable extends Table{ public CustomTable(TableModel model) { super(model); } protected Component createCell

lwuit calendar with button event

浪尽此生 提交于 2019-12-24 18:13:18
问题 i tried to show the calendar on button click using form but i'm unable to change the date and very much struggled to find where the focus . ... Button mdate=new Button("change date"); mdate.addActionListener(this); ... public void actionPerformed(ActionEvent ae) { Form cal= new Form(); com.sun.lwuit.Calendar c =new com.sun.lwuit.Calendar(); c.setFocus(true); c.addActionListener(this); cal.addComponent(c); cal.show(); } how to show and hide calendar on button click in a better way 回答1: Better

LWUIT ComboBox popup theming problem

僤鯓⒐⒋嵵緔 提交于 2019-12-24 15:56:38
问题 I want to customize the look of the ComboBox pop-up list in LWUIT. Nonetheless when I tried to change the ComboBox , ComboBoxFocus , ComboBoxItem , ComboBoxList , ComboBoxPopup components in LWUIT Theme Creator, nothing happened. The popup preview in Theme Creator still shows the pop-up in black text on white background. Am I missing something? How to change the theme of this pop-up? I am using LWUIT 1.4 回答1: Use the following styles in LWUIT resource edit, Unselected#ComboBoxItem#Color for

Additional jars from Resource Editor different from LWUIT 1.5 example apps

倖福魔咒の 提交于 2019-12-24 11:35:32
问题 I just realized that the Resource Editor still generates the old additional jars with creating the Netbeans project. For example: IO.jar , IO_SE.jar , UI.jar , UI_RIM_Touch.jar instead of LWUIT_MIDP.jar , MIDP_IO.jar , LWUIT_Blackberry_4_7_OrNewer.jar like used in the example apps in the LWUIT 1.5 download. Is this intentional? If yes, do I have to remove the ones auto generated and add the newer jars when working on my project in net-beans ? 回答1: The JAR's should generally be updated but

LWUIT Command buttons not always visible

百般思念 提交于 2019-12-24 10:59:22
问题 I've written a LWUIT app but every few times I run it in the builtin Netbeans J2ME emulator or the Nokia Series 40 emulator, the command buttons for the main page do not show up. If I hit the softkey for the second command to go the the help screen, then go back, the commands are visible. I setup my commands exactly according to the tutorial, with these few lines of code: Command exitCommand = new Command("Exit"); f.addCommand(exitCommand); Command settingsCommand = new Command("Help/About");

Command in LWUIT

本秂侑毒 提交于 2019-12-24 10:03:10
问题 How to add more than 2 command in a single row in at the Footer in lwuit Form ,suppose I want to add Back,Select,and Exit Command in a single row,how can I do that? Help with some example. 回答1: Use Display.getInstance().setThirdSoftButton(true); for showing three softbutton's. 回答2: You can also write your_Form.setDefaultCommand(the_command_in_the_middle); 回答3: I noticed that setting commandBehaviour to SoftKey in the resource editor makes all your commands align on one side, typical

LWUIT Localize MenuBar

巧了我就是萌 提交于 2019-12-24 07:38:07
问题 I'd like to localize the MenuBar of an LWUIT form . I don't want to show the users "Menu" / "Select" / "Cancel". I've successfully localized single commands, which get shown when the Menu opens, via back.setCommandName("bk"); searchCommand.setCommandName("search"); exit.setCommandName("ex"); mainMenu.addCommand(back, 0); mainMenu.addCommand(searchCommand, 1); mainMenu.addCommand(exit, 2); For the MenuBar I tried MenuBar m = NameOfMyForm.getMenuBar(); m.setName("test"); mainMenu.setMenuBar(m);

This page contains the following error: error on line 1 at column 1: Document is empty

房东的猫 提交于 2019-12-24 00:59:39
问题 Im unable to find out the solution , please help. below is the code. Thanks in advance <?php require_once('connect.php'); $sql = "select * from projet"; $result = $conn->query($sql); $xml = new SimpleXMLElement('<xml/>'); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { $mydata = $xml->addChild('mydata'); $mydata->addChild('Id',$row['idProjet']); } } else { echo "0 results"; } $conn->close(); header ("Content-Type:text/xml"); echo($xml->asXML());