public void doAlertDialog(String title,String message){
  JTextPane textArea=new JTextPane();
  ReportDisplay.setupStylesheet(textArea);
  textArea.setEditable(false);
  JScrollPane scrollPane=new JScrollPane(textArea,ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  textArea.setText("<pre>" + message + "</pre>");
  JOptionPane.showMessageDialog(frame,scrollPane,title,JOptionPane.ERROR_MESSAGE);
}

public void doAlertDialog ( String title , String message ) { JTextPane textArea = new JTextPane ( ) ; ReportDisplay . setupStylesheet ( textArea ) ; textArea . setEditable ( false ) ; JScrollPane scrollPane = new JScrollPane ( textArea , ScrollPaneConstants . VERTICAL_SCROLLBAR_AS_NEEDED , ScrollPaneConstants . HORIZONTAL_SCROLLBAR_AS_NEEDED ) ; textArea . setText ( "<pre>" + message + "</pre>" ) ; JOptionPane . showMessageDialog ( frame , scrollPane , title , JOptionPane . ERROR_MESSAGE ) ; }
pops up a dialog box showing an alert
