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 Integer getComboBoxIntegerValue(ComboBox<String> comboBox) {
        return comboBox.getValue() == null ? Integer.valueOf(comboBox.getPromptText())
                : Integer.valueOf(comboBox.getSelectionModel().getSelectedItem());
    }
}