Here you can find the source of setSelectedHeadersaveFileTypeItem( JComboBox combo, int fileType)
public static boolean setSelectedHeadersaveFileTypeItem( JComboBox combo, int fileType)
//package com.java2s; //License from project: Open Source License import javax.swing.JComboBox; public class Main { public static String[] headersaveFileTypeItems = { "", "A - Assemblerquelltext", "B - BASIC-Programm", "b - Tiny-BASIC-Programm", "C - MC-Programm, selbststartend", "M - MC-Programm", "E - EPROM-Inhalt", "I - Information (Text)", "T - Text" }; public static boolean setSelectedHeadersaveFileTypeItem( JComboBox combo, int fileType) { boolean rv = false; for (String s : headersaveFileTypeItems) { if (!s.isEmpty()) { if (s.charAt(0) == fileType) { combo.setSelectedItem(s); rv = true;/* w ww . j a v a 2 s . c om*/ break; } } } return rv; } }