I need to have a long descriptive dialog in part of my program and it display differently in mac and windows. On the mac in seems to word wraps the text and breaks it down into 3 or 4 lines but on the PC it just creates a really long dialog. Here is some code that shows my problems:
public class Test extends JFrame{
import javax.swing.JFrame;
import javax.swing.JOptionPane;
public class Test extends JFrame{
private String suggestion = "eee eee eeee eeee eeeerr rrrrr rrrrrrrr rrrrrr " +
"rrrrrr rrrrrrrrr rrrrrr rrrrr tttttt ttttttttttt ttttt tttttttttt ttt" +
" tttt tttttt ttttttttttt reroew uewurkpe jwrkl;ejr kejk ejrk;jewr;jeklr " +
"jk jre;wlj;ewjr;ej lejrlkejlkejlkjerl ejlrj kleklr jekl jlek " +
"rjklejrklejrklekl ";
public void showDialog()
{
JOptionPane.showMessageDialog(this,
suggestion,
"title",
JOptionPane.INFORMATION_MESSAGE,
null);
}
public static void main(String [] args)
{
Test test = new Test();
test.showDialog();
}
}
when I run this on Windows it just created one huge line of text in a long dialog but on the mac it creates multiple lines with a properly sized dialog.