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


Groups > comp.lang.java.help > #2400

Re: JScrollpane calors

From "John B. Matthews" <nospam@nospam.invalid>
Newsgroups comp.lang.java.help
Subject Re: JScrollpane calors
Date 2012-12-29 15:52 -0500
Organization The Wasteland
Message-ID <nospam-F944BB.15524729122012@news.aioe.org> (permalink)
References <kbdofo$lr8$1@speranza.aioe.org> <a7bud81avtisiaqs9nl2nb3cjjutd90g3s@4ax.com>

Show all headers | View raw


In article <a7bud81avtisiaqs9nl2nb3cjjutd90g3s@4ax.com>,
 Roedy Green <see_website@mindprod.com.invalid> wrote:

> On Tue, 25 Dec 2012 21:52:04 -0500, emf <emfril@gmail.com> wrote,
> quoted or indirectly quoted someone who said :
> 
> >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
> 
> have a look at the source code for JScrollPane to see where it gets 
> the colours.

I think the OP wants to modify the JScrollBar, rather than JTextPane, 
but no colors will be found in either component's source code. The UI 
delegate initializes default values by asking the UIManager.

> I had a similar problem with JSpinner. It turned out the 
> trick was to set the colours of the component pieces of a JSpinner.

This works for JSpinner, as it's a composite that includes other 
components. Of course, the delegate may use platform-specific 
variations, so the practice is fragile.

> You might just look for a pre-done L&F that does things the way you 
> want.  See http://mindprod.com/jgloss/laf.html

This has the salutary advantage of leveraging the designer's knowledge.

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Back to comp.lang.java.help | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

JScrollpane calors emf <emfril@gmail.com> - 2012-12-25 21:52 -0500
  Re: JScrollpane calors "John B. Matthews" <nospam@nospam.invalid> - 2012-12-25 23:34 -0500
    Re: JScrollpane calors emf <emfril@gmail.com> - 2012-12-26 03:27 -0500
      Re: JScrollpane calors "John B. Matthews" <nospam@nospam.invalid> - 2012-12-26 11:27 -0500
        Re: JScrollpane calors emf <emfril@gmail.com> - 2012-12-26 21:27 -0500
          Re: JScrollpane calors "John B. Matthews" <nospam@nospam.invalid> - 2012-12-27 09:32 -0500
  Re: JScrollpane calors Roedy Green <see_website@mindprod.com.invalid> - 2012-12-29 09:50 -0800
    Re: JScrollpane calors "John B. Matthews" <nospam@nospam.invalid> - 2012-12-29 15:52 -0500

csiph-web