Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import javafx.scene.control.ComboBox;

public class Main {
    public static String getComboBoxStringValue(ComboBox<String> comboBox) {
        return comboBox.getValue() == null ? comboBox.getPromptText()
                : comboBox.getSelectionModel().getSelectedItem();
    }
}