#1 pjotr
vyřešeno:
BufferedReader input = new BufferedReader(new FileReader("src/file.TXT"));
List<String> strings = new ArrayList<String>();
try {
String line = null;
while (( line = input.readLine()) != null){
strings.add(line);
}
}
catch(FileNotFoundException fnf){
System.out.println("File NOT found " + fnf.getMessage());
}
catch(IOException ioe){
System.out.println("Problem with error handling " + ioe.getMessage());
}
String[] lineArray = strings.toArray(new String[]{});
combobox = new JComboBox(lineArray);