1 24 25 26 29 30 package org.objectweb.clif.analyser.lib.gui; 31 32 import java.awt.GridLayout ; 33 import javax.swing.JPanel ; 34 import javax.swing.JScrollPane ; 35 import javax.swing.JTextArea ; 36 37 38 public class GuiPanelOutput extends JPanel { 39 40 private JTextArea output = new JTextArea (); 41 private JScrollPane scroll = new JScrollPane (output); 42 43 public GuiPanelOutput() { 44 setLayout(new GridLayout (1,1)); 45 add(scroll); 46 } 47 48 52 public void setOutputText(String arg) { 53 output.setRows(9); 54 output.append(arg+"\n"); 55 } 56 57 public void clearText() 58 { 59 output.selectAll(); 60 output.replaceSelection(""); 61 } 62 63 } 64 | Popular Tags |