Just giving the a heading to a simple output box

A was wondering within the following how nd where would i name the output box Prog1....thanksJOptionPane.showMessageDialog( null,"The word was"+words+"\nThe letters are "+"\n" +let1 + "\n" +let2 + "\n" +let3 +"\n" +let4);
[291 byte] By [ziggy12a] at [2007-10-3 7:40:59]
# 1
Cross-poster: http://forum.java.sun.com/thread.jspa?threadID=778066
CeciNEstPasUnProgrammeura at 2007-7-15 2:41:50 > top of Java-index,Java Essentials,New To Java...
# 2

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

Freshjivina at 2007-7-15 2:41:50 > top of Java-index,Java Essentials,New To Java...