Calling JFileChooser twice in invokelater causes program not to exit
问题 I am writing a program to collect information from two text files to add to tables in a database. In order to permit the user to select his own files I created a non-static method called chooseFile() that uses JFileChooser class to present a showOpenDialog (I've also tried it as a static method with the same results. If this sounds like I'm guessing, you're correct - I'm only so-so with programming). My understanding is that calls to Swing classes in main() should be done using invokelater .