This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, the problem you can find in your method showFileDialog. There is a lot of code, which can be easier. For example, you create your own URL, but the File has already a method, which does this for you. And if you want to fill your JEditorPane with the selected file, you don't need to create a new instance.