The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

How to make a large JOptionPane?

Posted by Avin Sinanan on February 04, 2002 at 1:44 PM

hello there is was wondering if anyone out there knows how to make a large JoptionPane.

Whenever I make a JOptionPane and I try to fit a paragraph in it the JOptionPane just gets longer and longer until it is as long as the JFrame and the words that cannot fit into the JOptionPane are not show.

I can create a JOptionPane using:

JOptionPane.showMessageDialog(frame,
"Eggs aren't supposed to be green.",
"Inane custom dialog",
JOptionPane.INFORMATION_MESSAGE,
icon);

But if intstead of "Eggs aren't suppose to be green" I wanted a long paragraph ..say at least 100 words. How do I do this
I tried using the "/n" (next line) after every sentence but it doe snot work.

Does anyone have any ideas?
Thanks in advance.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us