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

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -