source: src/main/java/genius/core/Logger.java

Last change on this file was 127, checked in by Wouter Pasman, 6 years ago

#41 ROLL BACK of rev.126 . So this version is equal to rev. 125

File size: 489 bytes
Line 
1package genius.core;
2
3import javax.swing.JTextArea;
4
5/**
6 *
7 * @author Dmytro Tykhonov
8 */
9public class Logger {
10 private JTextArea output;
11 /** Creates a new instance of Logger */
12 public Logger(JTextArea output) {
13 this.output = output;
14 }
15 public synchronized void add(String text) {
16 if(text!=null) {
17 output.append("\n"+text);
18 output.setCaretPosition(output.getDocument().getLength());
19 }
20
21 }
22}
Note: See TracBrowser for help on using the repository browser.