I tried to add sroll bars to a textarea with the following code. It is not wrkin. Show me a way out!
I just wanna add scrol bars to the textArea.
class srolpane extends JFrame{
private JTextArea txtAr;
private JScrollPane srlpane;
private scrolpane(){
txtAr = new JTextArea();
txtAr.setBounds(250,50,400,425);
srlpane= new JScrollPane(txtAr);
add(srlpane);
}
}