No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TextPanel.java 517B

123456789101112131415161718192021222324252627282930313233
  1. package Application1;
  2. import java.awt.Font;
  3. import javax.swing.JTextArea;
  4. public class TextPanel extends JTextArea {
  5. public TextPanel() {
  6. super();
  7. Font police = new Font(Font.MONOSPACED, Font.BOLD, 25);
  8. this.setFont(police);
  9. }
  10. public TextPanel(int taille) {
  11. super();
  12. Font police = new Font(Font.MONOSPACED, Font.PLAIN, taille);
  13. this.setFont(police);
  14. this.setLineWrap(true);
  15. this.setWrapStyleWord(true);
  16. }
  17. public void AjouterParagraph(String txt) {
  18. this.append(txt);
  19. }
  20. }