Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.swing.*;

import java.util.*;

public class Main {
    public static java.util.List getListData(JList jlist) {
        java.util.List out = new ArrayList();
        ListModel model = jlist.getModel();
        for (int i = 0; i < model.getSize(); i++)
            out.add(model.getElementAt(i));
        return out;
    }
}