Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #4664
| From | "John B. Matthews" <nospam@nospam.invalid> |
|---|---|
| Newsgroups | comp.lang.java.gui |
| Subject | Re: Setting JTabbedPane selected color |
| Date | 2011-08-29 12:12 -0400 |
| Organization | The Wasteland |
| Message-ID | <nospam-AAFE34.12123029082011@news.aioe.org> (permalink) |
| References | <2488a5a5-932a-4817-9dc0-ffa3f02ec462@p37g2000prp.googlegroups.com> <nospam-B82CB4.14120822082011@news.aioe.org> <faec3d1a-37dd-4009-ad5b-150f73da0d7e@x21g2000prd.googlegroups.com> <nospam-AF938A.04070627082011@news.aioe.org> <9bd7819f-c4e7-4543-8e5e-7282b1dd450c@z1g2000prf.googlegroups.com> |
In article <9bd7819f-c4e7-4543-8e5e-7282b1dd450c@z1g2000prf.googlegroups.com>, Fred <fred.l.kleinschmidt@boeing.com> wrote: > > but it looks like you have plenty of options. Apparently, you can > > even replace the relevant Painters: > > > > <http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/info.html> > > <http://www.jasperpotts.com/blog/category/nimbus/page/2/> > > <http://jasperpotts.com/blogfiles/nimbusdefaults/nimbus.html> > > > > I can't help but notice the similarity between the two interfaces: > > > > <http://download.oracle.com/javase/7/docs/api/javax/swing/Painter.html> > > <http://download.oracle.com/javase/7/docs/api/javax/swing/Icon.html> > > > > The problem in using the painter is that I need to know how the > Nimbus painter draws it so that in my override of the paint method I > can do exsactly the same thing, just with a different background > color. If I just draw a rectangle, its shape will be different than > all of the other tabs, which use some kind of rounded rectangle for > the outer part of the tab, and rectangular corners for the inner part > of the tab. Can you usefully invoke the existing Painter, perhaps in conjunction with a suitable AlphaComposite? > One should be able to do such a simple thing in a single line. I disagree. I see the defaults as belonging to the UI delegate or the user. I rarely alter them unless it affects usability in some critical way, e.g. unacceptably low contrast. Even then, I question my own color choice before tinkering with the delegate's design. OK, sometimes I can't resist a custom SliderUI: <http://stackoverflow.com/questions/6996263> -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar
Setting JTabbedPane selected color Fred <fred.l.kleinschmidt@boeing.com> - 2011-08-22 09:08 -0700
Re: Setting JTabbedPane selected color "John B. Matthews" <nospam@nospam.invalid> - 2011-08-22 14:12 -0400
Re: Setting JTabbedPane selected color Fred <fred.l.kleinschmidt@boeing.com> - 2011-08-26 07:14 -0700
Re: Setting JTabbedPane selected color "John B. Matthews" <nospam@nospam.invalid> - 2011-08-27 04:07 -0400
Re: Setting JTabbedPane selected color Fred <fred.l.kleinschmidt@boeing.com> - 2011-08-29 07:39 -0700
Re: Setting JTabbedPane selected color "John B. Matthews" <nospam@nospam.invalid> - 2011-08-29 12:12 -0400
Re: Setting JTabbedPane selected color Knute Johnson <nospam@knutejohnson.com> - 2011-08-29 16:52 -0700
csiph-web