This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi guys, Following is a piece of code in my "Connection" program. Sometimes the TextArea - display scrolls automaticly, but sometimes it doesn't. Can anybody tell me why? Thanks, JTextArea display = new JTextArea(15, 40); display.setBackground(Color.cyan); display.setEditable(false); JScrollPane js = new JScrollPane(display); js.setAutoscrolls(true); //display.setAutoscrolls(true); display.setToolTipText("Messages");
because it's auto-scroll thats' why! (arrr....that was the seinfeld inside me...sorry, couldn't resist ) On a more serious not, when autoscroll is set the right way, the scrolls appear when the text content is more than the visible area. if the text content can fit in the visible area, the scrolls don't show-up. Not sure if this is what you were looking for, maybe I missed your point... regds. - satya
Jerry Seinfield doesn't know Autoscroll, Elaine knows. It's not that simple. I thought I wasn't talk about "appear". Just like a chat room, when you receive a long message, you don't wanna scroll down yourself. In my situation, I have to scroll it down sometimes. Thanks,