Here you can find the source of printComboBoxView(ArrayList alOptionValue, String sDefaultValue)
public static String printComboBoxView(ArrayList alOptionValue, String sDefaultValue)
//package com.java2s; import java.util.ArrayList; public class Main { public static String printComboBoxView(ArrayList alOptionValue, String sDefaultValue) { String sCombo = sDefaultValue; if (alOptionValue != null && !alOptionValue.isEmpty()) { for (int iOption = 0; iOption < alOptionValue.size(); iOption++) { String[] sOptionItem = (String[]) alOptionValue.get(iOption); if (sOptionItem != null) { if (sOptionItem[0].equals(sDefaultValue)) { sCombo = sOptionItem[1]; break; }/*from w w w . j a v a2 s .com*/ } } } return sCombo; } }