Platform: startup error dialog UI tuned a little bit

This commit is contained in:
Anton Makeev
2014-12-18 11:08:59 +01:00
parent ca49f7efc1
commit 686cb4f009
@@ -221,12 +221,13 @@ public class Main {
JTextPane textPane = new JTextPane();
textPane.setEditable(false);
textPane.setText(message.replaceAll("\t", " "));
textPane.setBackground(Color.white);
textPane.setBackground(new JPanel().getBackground());
textPane.setCaretPosition(0);
JScrollPane scrollPane = new JScrollPane(
textPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setBorder(null);
int maxHeight = Toolkit.getDefaultToolkit().getScreenSize().height - 150;
int maxHeight = Math.min(600, Toolkit.getDefaultToolkit().getScreenSize().height - 150);
Dimension component = scrollPane.getPreferredSize();
if (component.height >= maxHeight) {
Object setting = UIManager.get("ScrollBar.width");