I have a string that I want to display in a JOptionPane
.
String info = "Name:" + _name + "\n" +
"Phone:" + _phone;
I tried to add \t
but it didn't work.
I tried also to
int choose = JOptionPane.showConfirmDialog(this,new JTextArea(info),"XXX",0);
But it doesn't look good.
Are there another ways to do that? (If you know about a solution where I can use something like \t
it will be very usefull for me)
* In this specific example I can manually align it, but I'm looking for a general solution.