Vertical scrollbar foreground

Discussion in 'Java' started by emf, Dec 29, 2012.

  1. emf

    emf Guest

    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
    emf, Dec 29, 2012
    #1
    1. Advertising

  2. In article <kbm3v3$8g7$>, emf <>
    wrote:

    > 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?


    See also: <kbgbdf$9m2$>

    <https://groups.google.com/forum/#!topic/comp.lang.java.help/lEXIVgvqOaw/discussion>

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
    John B. Matthews, Dec 29, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. r pasadhy via .NET 247

    positioning vertical scrollbar

    r pasadhy via .NET 247, Aug 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    3,123
    Joe Fallon
    Aug 12, 2004
  2. Olav Tollefsen
    Replies:
    1
    Views:
    40,659
    Ken Cox [Microsoft MVP]
    Jan 29, 2005
  3. SJ
    Replies:
    1
    Views:
    1,609
    Kevin Spencer
    Jan 11, 2006
  4. Don Schneider
    Replies:
    0
    Views:
    1,999
    Don Schneider
    Jun 27, 2003
  5. Sean
    Replies:
    2
    Views:
    430
    Toby A Inkster
    Aug 7, 2003
Loading...

Share This Page