public boolean messageShow(String message){
  JTextArea msgArea=new JTextArea(message,10,75);
  msgArea.setLineWrap(true);
  JScrollPane scrollPane=new JScrollPane(msgArea);
  if (SwingUtilities.isEventDispatchThread())   JOptionPane.showMessageDialog(logFrame,scrollPane,"Copiate questo messaggio",JOptionPane.INFORMATION_MESSAGE);
 else   SwingUtilities.invokeLater(new SwingShowMessage(scrollPane,JOptionPane.INFORMATION_MESSAGE));
  return true;
}

public boolean messageShow ( String message ) { JTextArea msgArea = new JTextArea ( message , 10 , 75 ) ; msgArea . setLineWrap ( true ) ; JScrollPane scrollPane = new JScrollPane ( msgArea ) ; if ( SwingUtilities . isEventDispatchThread ( ) ) JOptionPane . showMessageDialog ( logFrame , scrollPane , "Copiate questo messaggio" , JOptionPane . INFORMATION_MESSAGE ) ; else SwingUtilities . invokeLater ( new SwingShowMessage ( scrollPane , JOptionPane . INFORMATION_MESSAGE ) ) ; return true ; }
shows the given message to the user in a reliable way .
