Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #20789

Vertical scrollbar foreground

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!zen.net.uk!dedekind.zen.co.uk!aioe.org!.POSTED!not-for-mail
From emf <emfril@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Vertical scrollbar foreground
Date Sat, 29 Dec 2012 01:57:07 -0500
Organization Aioe.org NNTP Server
Lines 36
Message-ID <kbm3v3$8g7$1@speranza.aioe.org> (permalink)
NNTP-Posting-Host q0ALVNQQ0ipGALYDIb4tnQ.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.programmer:20789

Show key headers only | View raw


I have a textarea with a vertical scrollbar; I have changed the 
scrollbar's  and I want to change the scrollbar's. After trying 
unsuccessfully to change the colors of the scroolbar with

scroller.setForeground(Color.GRAY);
scroller.setBackground(Color.BLACK);

I managed to change its background color with

scroller.getVerticalScrollBar().setBackground(Color.BLACK);

the command however

scroller.getVerticalScrollBar().setForeground(Color.GRAY);

has no effect.

Googling I found that I have to use

public TextPaneRenderer() {
      setEditable(false);
      putClientProperty(HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);
}

(https://forums.oracle.com/forums/thread.jspa?threadID=2269764)

but I do not know what to make of it. How exactly do I insert it in the 
code=? And do I have to import something?

Thanks,

Eustace

-- 
It ain't THAT, babe! - A radical reinterpretation
https://files.nyu.edu/emf202/public/bd/itaintmebabe.html

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Vertical scrollbar foreground emf <emfril@gmail.com> - 2012-12-29 01:57 -0500
  Re: Vertical scrollbar foreground "John B. Matthews" <nospam@nospam.invalid> - 2012-12-29 10:56 -0500

csiph-web