From 6e58fa79fb166507185df7668f4a77d6a90cc068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 13 Feb 2021 15:46:25 +0100 Subject: [PATCH] FontPanel scrollRectToVisible fix --- src/com/jpexs/decompiler/flash/gui/FontPanel.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/jpexs/decompiler/flash/gui/FontPanel.java b/src/com/jpexs/decompiler/flash/gui/FontPanel.java index 6f3353e90..93344a35c 100644 --- a/src/com/jpexs/decompiler/flash/gui/FontPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/FontPanel.java @@ -223,7 +223,11 @@ public class FontPanel extends JPanel { fontLeadingLabel.setText(ft.getLeading() == -1 ? translate("value.unknown") : Integer.toString(ft.getLeading())); String chars = ft.getCharacters(); fontCharactersTextArea.setText(chars); - fontCharactersScrollPane.getVerticalScrollBar().scrollRectToVisible(new Rectangle(0, 0, 1, 1)); + try { + fontCharactersScrollPane.getVerticalScrollBar().scrollRectToVisible(new Rectangle(0, 0, 1, 1)); + } catch (Exception ex) { + //ignore + } setAllowSave(false); Font selFont = ft.getSystemFont();