Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add text area on JOptionPane

Currently I have a JOptionPane. On clicking a button I am executing following line.

JOptionPane.showInputDialog(this,"Enter your message","Messages",2);

It opens a popup with a text box. This text box accepts around 40/50 characters. In fact my requirement is to take long message (upto 300 characters) in this text box which is stopping this. So we want to come up with a text area on this input dialog? Is it possible how? Is there any better solution? Thanks in advance.

like image 632
java_enthu Avatar asked Oct 14 '11 09:10

java_enthu


People also ask

What are the 4 JOptionPane dialog boxes?

JOptionPane 's icon support lets you easily specify which icon the dialog displays. You can use a custom icon, no icon at all, or any one of four standard JOptionPane icons (question, information, warning, and error).


1 Answers

official tutorial contains example for that, another examples here

like image 118
mKorbel Avatar answered Sep 20 '22 12:09

mKorbel