List of usage examples for javax.swing JComboBox updateUI
public void updateUI()
From source file:org.apache.jmeter.util.JMeterUtils.java
/** * Sets the selection of the JComboBox to the Object 'name' from the list in * namVec./*w ww. j a va2 s . c o m*/ * NOTUSED? * @param properties not used at the moment * @param combo {@link JComboBox} to work on * @param namVec List of names, which are displayed in <code>combo</code> * @param name Name, that is to be selected. It has to be in <code>namVec</code> */ @Deprecated public static void selJComboBoxItem(Properties properties, JComboBox<?> combo, Vector<?> namVec, String name) { int idx = namVec.indexOf(name); combo.setSelectedIndex(idx); // Redisplay. combo.updateUI(); }
From source file:org.ut.biolab.medsavant.client.filter.TagFilterView.java
private static void updateTagValues(String tagName, JComboBox tagValueCB) { tagValueCB.removeAllItems();/*from www. j a va 2 s .c o m*/ if (tagName != null) { List<String> values; try { values = MedSavantClient.VariantManager.getValuesForTagName(LoginController.getSessionID(), tagName); for (String val : values) { tagValueCB.addItem(val); } } catch (Exception ex) { ClientMiscUtils.reportError("Error updating tag values: %s", ex); } } tagValueCB.updateUI(); }