39 lines
887 B
Java
39 lines
887 B
Java
package View;
|
|
|
|
import javax.swing.*;
|
|
import javax.swing.border.TitledBorder;
|
|
import java.awt.*;
|
|
|
|
/**
|
|
* Implementierung verschiedener Algorithmen zur Berechnung von Ausgleichsgeraden.
|
|
*
|
|
* @Author: Armin Wolf
|
|
* @Email: a_wolf28@uni-muenster.de
|
|
* @Date: 02.06.2017.
|
|
*/
|
|
public class OutputPanel extends JPanel {
|
|
|
|
private JTextArea output;
|
|
private JScrollPane scrollPane;
|
|
|
|
|
|
public OutputPanel(){
|
|
this.setBorder(new TitledBorder("Ausgabekanal"));
|
|
this.setLayout(new BorderLayout());
|
|
output = new JTextArea();
|
|
output.setEditable(false);
|
|
output.setLineWrap(true);
|
|
output.setWrapStyleWord(true);
|
|
scrollPane = new JScrollPane(output);
|
|
scrollPane.setWheelScrollingEnabled(true);
|
|
this.add(scrollPane, BorderLayout.CENTER);
|
|
|
|
}
|
|
|
|
|
|
public void append(String s) {
|
|
output.append(s + "\n");
|
|
}
|
|
|
|
}
|