Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.DefaultListModel;
import javax.swing.JList;

public class Main {
    public static void main(String[] argv) throws Exception {
        DefaultListModel model = new DefaultListModel();
        JList list = new JList(model);

        int pos = 0;
        model.add(pos, "a");
    }
}