public static JComponent createExceptionComponent(String message, Throwable exception, IExtension extension) { return new ComponentExceptionPanel(message, exception, extension); }
public ComponentExceptionPanel(String message, Throwable exception, IExtension extension) { setLayout(new BorderLayout()); setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(BORDER_THICKNESS, BORDER_THICKNESS, BORDER_THICKNESS, BORDER_THICKNESS), BorderFactory.createMatteBorder(1, 1, 1, 1, Color.RED))); JLabel label = new JLabel("<html><body>" + message + "<br>" + exception.getClass().getSimpleName() + ":<br>" + exception.getMessage() + "<br>" + "</body></html>", JLabel.CENTER); label.setForeground(Color.RED); add(label, BorderLayout.NORTH); } }
public ComponentExceptionPanel(String message, Throwable exception, IExtension extension) { setLayout(new BorderLayout()); setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(BORDER_THICKNESS, BORDER_THICKNESS, BORDER_THICKNESS, BORDER_THICKNESS), BorderFactory.createMatteBorder(1, 1, 1, 1, Color.RED))); JLabel label = new JLabel("<html><body>" + message + "<br>" + exception.getClass().getSimpleName() + ":<br>" + exception.getMessage() + "<br>" + "</body></html>", JLabel.CENTER); label.setForeground(Color.RED); add(label, BorderLayout.NORTH); } }
public ComponentExceptionPanel(String message, Throwable exception, IExtension extension) { setLayout(new BorderLayout()); setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(BORDER_THICKNESS, BORDER_THICKNESS, BORDER_THICKNESS, BORDER_THICKNESS), BorderFactory.createMatteBorder(1, 1, 1, 1, Color.RED))); JLabel label = new JLabel("<html><body>" + message + "<br>" + exception.getClass().getSimpleName() + ":<br>" + exception.getMessage() + "<br>" + "</body></html>", JLabel.CENTER); label.setForeground(Color.RED); add(label, BorderLayout.NORTH); } }
public static JComponent createExceptionComponent(String message, Throwable exception, IExtension extension) { return new ComponentExceptionPanel(message, exception, extension); }
public static JComponent createExceptionComponent(String message, Throwable exception, IExtension extension) { return new ComponentExceptionPanel(message, exception, extension); }