Java JComboBox Selection getSelectedName(JComboBox comboBox)

Here you can find the source of getSelectedName(JComboBox comboBox)

Description

get Selected Name

License

Open Source License

Declaration

public static String getSelectedName(JComboBox comboBox) 

Method Source Code

//package com.java2s;
/**//from  www  .  j  a va  2 s . c o  m
 * Copyright (c) 2001-2016 Mathew A. Nelson and Robocode contributors
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://robocode.sourceforge.net/license/epl-v10.html
 */

import javax.swing.JComboBox;

public class Main {
    public static String getSelectedName(JComboBox comboBox) {
        return (String) comboBox.getSelectedItem();
    }
}

Related

  1. anySelected(JComboBox box)
  2. getSelectedItem(Object combo)
  3. getSelectedString(JComboBox jcb)
  4. getTypedSelectedItemFromCombo(JComboBox combo)
  5. safeSelectFirst(JComboBox cb)
  6. selectComboBoxItem(JComboBox jComboBox, String name)