[IMPL] path supports dir and files now

This commit is contained in:
RatzzFatzz
2020-02-11 19:58:27 +01:00
parent 5c36511774
commit 5c37fc6842
3 changed files with 34 additions and 7 deletions

View File

@@ -0,0 +1,21 @@
package config;
import javax.swing.*;
import java.io.IOException;
import java.io.OutputStream;
public class CustomOutputStream extends OutputStream {
private JTextArea textArea;
public CustomOutputStream(JTextArea textArea) {
this.textArea = textArea;
}
@Override
public void write(int b) throws IOException {
// redirects data to the text area
textArea.append(String.valueOf((char) b));
// scrolls the text area to the end of data
textArea.setCaretPosition(textArea.getDocument().getLength());
}
}