My code is supposed to take in words from the end user and store them in a file called dictionary, one word at a time. But t doesn't do so. Can someone tell me why?

import javax.swing.JOptionPane;...