private void alignScrollPane() {
            stage.setWidth(
                stage.icon.getImage().getWidth()
                + Math.max(
                    stage.messageLabel.getWidth(),
                    (stage.stacktraceVisible 
                        ? Math.max(
                            stage.stacktraceButtonsPanel.getWidth(),
                            stage.stackTraceLabel.getWidth())
                        : stage.stacktraceButtonsPanel.getWidth()))
                + 5 * MARGIN);
            
            stage.setHeight(
                    Math.max(
                        stage.icon.getImage().getHeight(),
                        stage.messageLabel.getHeight()
                            + stage.stacktraceButtonsPanel.getHeight()
                            + (stage.stacktraceVisible
                                ? Math.min(
                                    stage.stackTraceLabel.getHeight(),
                                    STACKTRACE_LABEL_MAXHEIGHT)
                                : 0))
                    
                    + stage.buttonsPanel.getHeight()
                    + 3 * MARGIN);
            if (stage.stacktraceVisible) {
                stage.scrollPane.setPrefHeight(
                    stage.getHeight()
                    - stage.messageLabel.getHeight()
                    - stage.stacktraceButtonsPanel.getHeight()
                    - 2 * MARGIN);
            }
            
            stage.centerOnScreen();
        }