Java JComboBox getAgeComboBox()

Here you can find the source of getAgeComboBox()

Description

get Age Combo Box

License

Apache License

Declaration

public static JComboBox<Integer> getAgeComboBox() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Map;
import java.util.TreeMap;

import javax.swing.JComboBox;

public class Main {
    public static Map<Integer, String> age = new TreeMap<>();

    public static JComboBox<Integer> getAgeComboBox() {
        JComboBox<Integer> jcb = new JComboBox<Integer>();
        for (int id : age.keySet()) {
            jcb.addItem(id);//from  w  w w  . ja  v a2  s .  c  o  m
        }
        return jcb;
    }
}

Related

  1. disableListenersForComboBox(JComboBox comboBox)
  2. ensureCustomBackgroundStored(JComboBox comp)
  3. exist(JComboBox x)
  4. fixComboOrientation(JComboBox combo)
  5. generateComboBoxFor(Object... objs)
  6. getComboBoxDisabledBackground()
  7. getEOL(JComboBox eolCombo)
  8. getJComboBoxString(JComboBox comboBox)
  9. getMaxWidth(final JComboBox combo, final FontMetrics fm)