This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JOptionPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane" Watch "JOptionPane" New topic


Vaskar Dasgupta

Joined: Jul 20, 2001
Posts: 25
How to have a new line of text in a JOptionPane. The message i am displaying is a looooooong one, thus the width of the JOptionPane becomes too long. I want the text too come to the net line.
JOptionPane optionPane = new JOptionPane("UserID/Password should be minimum 3/8 & maximum 8/12 characters. Blah Blah Blah................", JOptionPane.INFORMATION_MESSAGE);
JDialog info1 = optionPane.createDialog(parentFrame,"DES Login");
Awaiting Reply

Kindly reply back.
I agree. Here's the link:
subject: JOptionPane
It's not a secret anymore!