Skip to content

Commit 5960323

Browse files
committed
SwingConsolePane: add method to clear the console
1 parent 48aac59 commit 5960323

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ public JScrollPane getScrollPane() {
103103
return scrollPane;
104104
}
105105

106+
public void clear() {
107+
if (consolePanel == null) initConsolePanel();
108+
textPane.setText("");
109+
}
110+
106111
// -- ConsolePane methods --
107112

108113
@Override

0 commit comments

Comments
 (0)