swing - How to have scrolling in Java GUI JTextArea with Eclipse? -
i trying put muti lines text in jtextarea, there isn't scrolling cannot move see data below default jtextarea area, here code , textarea_1 jtextarea:
string abc=""; for(int i=0; i<=100; i++){ abc = abc + data[i][0]+"\n"; } textarea_1.settext(abc);
you need adding jscrollpane.
link: http://docs.oracle.com/javase/7/docs/api/javax/swing/jscrollpane.html
import javax.swing.jscrollpane; jscrollpane scrollpane = new jscrollpane(textareahere);
Comments
Post a Comment