question: public static void showString ( String title , String content ) { JTextArea area = new JTextArea ( content ) ; area . setEditable ( false ) ; JScrollPane scroll = new JScrollPane ( area ) ; scroll . setPreferredSize ( new Dimension ( 500 , 300 ) ) ; JOptionPane . showMessageDialog ( null , scroll , title , JOptionPane . INFORMATION_MESSAGE ) ; }
target:  Display a string (can be long) inside a message dialogue