File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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!