MiaPro
MiaPro

Reputation: 11

JAVA Display both JOPTIONPANE messages as one message

I need this to show as one Joptionpane, NOT one then the other. However, the second contains information from a textarea and will not show up correctly when I put it with the first. How do I go about this? The "Per" shows multiple textfields and combobox answers. The ContactTA is a textarea.

                for (int count = 0; count < per.size(); count++){
                //contactTA.add(per.get(count).toString());
                JOptionPane.showMessageDialog(null, per.get(count).toString());
            }
              JOptionPane.showConfirmDialog(main, contactPanel,
                    "Contact Information", JOptionPane.OK_CANCEL_OPTION,
                    JOptionPane.PLAIN_MESSAGE);

Upvotes: 0

Views: 47

Answers (1)

Kasarrah
Kasarrah

Reputation: 325

It looks like you might be trying to merge two different JOptionPanes? I would recommend just making your own error message class depending on what you are trying to do. If you really want both messages up at the same time I believe you can do it with threading.

Upvotes: 1

Related Questions