I try to display an ArrayList in a nice way into an InfoBox.
The ArrayList contains names (String) of files that got edited in a certain period of work and gets created automatically.
If I use JOptionPane.showMessageDialog, I get a super long window that is impossible to read.
It would be better to have a nice list view.
How do I do that?
The parts of the code affected:
//List initiation
List output = new ArrayList();
//FIll List with data
for (String fileOrFilderName : changedFilesAndFolders) {
output.add(fileOrFilderName);
}
//Output
JOptionPane.showMessageDialog(null, output, "Edited or added files",
JOptionPane.INFORMATION_MESSAGE);
Output: Too long window
List output = new ArrayList();//FIll List with datafor (String fileOrFilderName : changedFilesAndFolders) { output.add(fileOrFilderName);} //OutputJOptionPane.showMessageDialog(null, output, "Edited or added files", JOptionPane.INFORMATION_MESSAGE);