This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths 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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane" Watch "JOptionPane" New topic
Author

JOptionPane

Vaskar Dasgupta
Greenhorn

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");
info.setResizable(false);
info.show();
Awaiting Reply


Kindly reply back.
 
Don't get me started about those stupid light bulbs.
 
subject: JOptionPane
 
It's not a secret anymore!