Runtime « JList « Java Swing Q&A





1. gui JLIst runtime error    stackoverflow.com

How do I fix my RemoveAction class so I don't get the following runtime error
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1

import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.util.List;
import java.util.ArrayList;
import java.io.*;


public class GuiDriver extends JFrame{
 ...