So, I'm writing a java code that get a number of places from a file (int pl), the places are named by their number from 1 to max place number(pl). So I want to get the available places from those places from user. I want to create in GUI a list of Chekboxes with their names place 1 place 2
------ place pl
and the user check the available places
package dlp;
import java.io.*;
import java.util.ArrayList;
import javax.swing.*;
public class Run1 extends javax.swing.JFrame {
public Run1() {
initComponents();
}
public static void main(String args[]) throws IOException {
FileReader fr = new FileReader("Dis.txt");
ArrayList<Integer> dis = new ArrayList();
String di= fr.toString();
String[] d = di.split(" ");
for(int i=0; i<d.length;i++){
dis.add(Integer.parseInt(d[i]));
}
FileReader f2=new FileReader("Pla.txt");
String s=f2.toString();
int pl = Integer.parseInt(s);
}