I am using lwuit with j2me. How to get a combo box of a selected item or index? I found a function for setSelectedIndex , but not for selection.
Use this code:
combobox.getSelectedIndex();
To return the currently selected offset in the list.
combobox.getSelectedItem();
To return the currently selected item in the list or null to select
To get what you selected as a string:
String selected_text = ComboBox.getItemAt(ComboBox.getSelectedIndex());
Source: https://habr.com/ru/post/893485/More articles:Converting an Initializer List - c ++Transferring VSTO Tape to the main tabControlId - c #The risk of damaging your computer by changing memory in C ++ - c ++Is a 128-bit long float useful? - floating-pointHow to change what PCRE regexp thinks is a newline in multiline mode? - phpActiveRecord :: RecordNotFound processing in Ruby on Rails - ruby-on-railsAdd new item to list in list - pythonPaste into JPA collection without loading - javaIs ArrayList [] [] possible? - javaFine Grain Security at Solr - securityAll Articles