Re: JOptionPane blank message after first time



James McGill wrote:
I have a problem getting this to work. It's in the update() method of an observer, and I want to see this JOptionPane every update:

JOptionPane.showMessageDialog(null, result.toString(), "Result", JOptionPane.INFORMATION_MESSAGE);

It shows fine the first time, but after the first time, I just see the JOptionPane's frame, and it will paint the button if I mouse over it, but no message. What could be wrong? the "result" object isn't null
or anything like that.

Makes no difference if I put a container as the first argument.


There's nothing wrong with that piece of code. The bug might lie somewhere else so it might be useful if you can give some more details
.


Quantcast