Create the buttons based upon the number of html files in a for loop. If you need to keep references then store them in a List.


Object[] htmlFiles;
//load html files
JButton[] buttons = new...