From 3cb8e67cddda515d61f24cfaaa4d4548ea438e87 Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Tue, 11 Mar 2008 21:45:29 +0000 Subject: [PATCH] Some enhancements of the error dialog. --- .../impl/gui/customcontrols/ErrorDialog.java | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java b/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java index 7cf236b2d..2de496c72 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java @@ -51,7 +51,9 @@ public class ErrorDialog private JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); - private JPanel messagePanel = new JPanel(new BorderLayout(20, 15)); + private JPanel infoMessagePanel = new JPanel(); + + private JPanel messagePanel = new JPanel(new BorderLayout()); private JPanel mainPanel = new JPanel(new BorderLayout(10, 10)); @@ -84,8 +86,13 @@ public ErrorDialog( Frame owner, this.setTitle(title); - this.messagePanel.add(msgTextArea, BorderLayout.NORTH); + this.infoMessagePanel.setLayout( + new BoxLayout(infoMessagePanel, BoxLayout.Y_AXIS)); + + this.infoMessagePanel.add(msgTextArea); + this.msgTextArea.setLineWrap(true); + this.msgTextArea.setWrapStyleWord(true); this.msgTextArea.setText(message); this.init(); @@ -113,22 +120,22 @@ public ErrorDialog( Frame owner, this.htmlMsgEditorPane.addHyperlinkListener(this); - this.messagePanel.add(htmlMsgEditorPane, BorderLayout.NORTH); - String startDivTag = "
"; String endDivTag = "
"; - String msgString = startDivTag + message - + " more info" + endDivTag; + String msgString = startDivTag + + " more info" + + endDivTag; htmlMsgEditorPane.appendToEnd(msgString); + this.infoMessagePanel.add(htmlMsgEditorPane); + StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.close(); - String stackTrace = sw.toString(); try @@ -182,6 +189,8 @@ private void init() this.mainPanel.add(iconLabel, BorderLayout.WEST); + this.messagePanel.add(infoMessagePanel, BorderLayout.NORTH); + this.mainPanel.add(messagePanel, BorderLayout.CENTER); this.mainPanel.add(buttonsPanel, BorderLayout.SOUTH);