• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Need help quick, scrollable box in java

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Avg

Senior Member
Joined
Oct 30, 2003
I want to know who to display a string on a scrollable box, my project is due at noon today and I need to do it before then.

TIA
 
import javax.swing.JTextArea;
import javax.swing.JScrollPane;

private JTextArea TArea = new JTextArea("String goes Here!");

add(new JScrollPane(TArea));


Assuming of course you have JFrame and all that already working...
Edit: Sorry this ain't before noon; I have found it's a good habit to do homework when you first get it, rather then right before it's due.
 
Back