This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Dear Friends, I have a problem with JTextArea.I've defined the JTextArea constructor with 2rows and 2 cols.Now when i enter text into it and press enter key again and again, then instead of an appreance of a scrollbar the area of the JtextArea keep increasing, this results in the shrinking of other JtextField/JTextarea. Can we Fix this area Of the JTextArea anyhow/or is there any other way to solve this problem? Thanx
Hi, Have you defined a scroll pane to put the text area into? If not, try somethign like this: //Create a new JScrollPane JScrollPane scrollPane = new JScrollPane(); //Add the JTextArea to the JScrollPane scrollPane.setViewportView(my_troublesome_text_area); //Add the JScrollPane to the main content pane for the frame mainContentPane.add(scrollPane); Hope this helps! cheers, Ben.
"santosh8" your name doesn't agree with the javaranch guidelines. please take a moment and re-register after reviewing the guidelines at http://www.javaranch.com/name.jsp thanks for your cooperation. - satya