I'm not too sure what your asking but I'm assuming you want to name the JOptionPane object Prog1, if so this is how you would do it:
JOptionPane Prog1 = new JOptionPane();
Prog1.showMessageDialog(null, "The word was"+words+
"\nThe letters are "+
"\n" +let1 +
"\n" +let2 +
"\n" +let3 +
"\n" +let4);
Hope that Helps.
Fresh