Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.swing.JComboBox;

public class Main {
    public static Object getSelectedValue(JComboBox cb, Object[] val) {
        int selIndex = cb.getSelectedIndex();
        if (selIndex == -1)
            return null;
        return val[selIndex];
    }
}