Skip to content

Commit 0cb660c

Browse files
committed
SwingConsolePane: keep a JScrollPane reference
This will be useful shortly, to manipulate the scroll pane as needed.
1 parent a6d8604 commit 0cb660c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/scijava/ui/swing/console/SwingConsolePane.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public class SwingConsolePane extends AbstractConsolePane<JPanel> {
6767

6868
private JPanel consolePanel;
6969
private JTextPane textPane;
70+
private JScrollPane scrollPane;
71+
7072
private StyledDocument doc;
7173
private Style stdoutLocal;
7274
private Style stderrLocal;
@@ -156,7 +158,7 @@ private synchronized void initConsolePanel() {
156158
textPanel.setLayout(new BorderLayout());
157159
textPanel.add(textPane);
158160

159-
final JScrollPane scrollPane = new JScrollPane(textPanel);
161+
scrollPane = new JScrollPane(textPanel);
160162
scrollPane.setPreferredSize(new Dimension(600, 600));
161163
panel.add(scrollPane);
162164

0 commit comments

Comments
 (0)