package GUI;
import javax.swing.*;
import java.awt.*;
/**
* @todo comments
*
*/
public class textPanel extends JPanel {
JLabel label;
/**
* Create a new JPanel with text on it. @todo edit comment
* @param text the text to display
* @param fontSize
*/
textPanel(String text, int fontSize){
//this = new JPanel( new BorderLayout() );
label = new JLabel(text);
this.add(label);
label.setFont(new Font("Courier", Font.PLAIN, fontSize));
}
public void append(String s){
label.setText(label.getText() + s);
}
public String getText(){
return label.getText();
}
public void setText(String s){
label.setText(s);
}
}