In the attached file i have given the code to create a text area when a buton is clicked along with a scrollbar .in the output i can see the button but it does not work so i cannot see the text area over which it will be written "button clicked. I have used the concept of interface and inner class.please see the code and help me out.
I cant view .java files on the phone but i suspect you haven't used a validate(); call.. This kind of operation is not thread safe so I'm not surprised it doesent work. But here's a walkaround: use textarea.setPrefferedSize(new Dimension(1,1)); for the not viewable text area and then call the same method with the parameters 450,450(viewable text area), for example.. To add a scrollbar you just do add(new JScrollPane(textArea));