Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: emf Newsgroups: comp.lang.java.help Subject: JScrollpane calors Date: Tue, 25 Dec 2012 21:52:04 -0500 Organization: Aioe.org NNTP Server Lines: 31 Message-ID: NNTP-Posting-Host: lky93DK51LsDgXt+CRndwA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.help:2386 I have made a JTextArea with a JScrollpane. The colors are dark, so I want the scroller to have a darker color then the default. I tried scroller.setForeground(Color.GRAY); scroller.setBackground(Color.BLUE); but they do not have any effect. Why? The code is: outputArea = new JTextArea("", 19, 37); outputArea.setForeground(Color.WHITE); outputArea.setBackground(Color.BLACK); outputArea.setFont(textFont); outputArea.setEditable(false); outputPanel.add(resultsArea); JScrollPane scroller = new JScrollPane(resultsArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scroller.setForeground(Color.GRAY); scroller.setBackground(Color.BLUE); outputPanel.add(scroller); Thanks. Eustace -- It ain't THAT, babe! - A radical reinterpretation https://files.nyu.edu/emf202/public/bd/itaintmebabe.html