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


Groups > comp.lang.java.gui > #1861 > unrolled thread

Change the color of the c

Started by"deel007" <deel007@THRWHITE.remove-dii-this>
First post2011-04-27 15:35 +0000
Last post2011-04-27 15:35 +0000
Articles 5 — 5 participants

Back to article view | Back to comp.lang.java.gui


Contents

  Change the color of the c "deel007" <deel007@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
    Re: Change the color of t "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
      Re: Change the color of t "Laird Nelson" <laird.nelson@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
    Re: Change the color of t "Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
      Re: Change the color of t deel007@googlemail.com.remove-dii-this - 2011-04-27 15:35 +0000

#1861 — Change the color of the c

From"deel007" <deel007@THRWHITE.remove-dii-this>
Date2011-04-27 15:35 +0000
SubjectChange the color of the c
Message-ID<1182242246.382044.43420@k79g2000hse.googlegroups.com>
  To: comp.lang.java.gui
Hello,

I am trying  to custumize a  JCheckbox by changing the color of the
checkmark , but i dont know how !!
any idea ?

best regards

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#1862 — Re: Change the color of t

From"Roedy Green" <roedy.green@THRWHITE.remove-dii-this>
Date2011-04-27 15:35 +0000
SubjectRe: Change the color of t
Message-ID<mv5f73lsnups4chpr142pdb2lcvq83535h@4ax.com>
In reply to#1861
  To: comp.lang.java.gui
On Tue, 19 Jun 2007 01:37:26 -0700, deel007@googlemail.com wrote,
quoted or indirectly quoted someone who said :

>
>I am trying  to custumize a  JCheckbox by changing the color of the
>checkmark , but i dont know how !!

The official way to do that would be to create your own custom look
and feel variant.  see http://mindprod.com/jgloss/laf.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1864 — Re: Change the color of t

From"Laird Nelson" <laird.nelson@THRWHITE.remove-dii-this>
Date2011-04-27 15:35 +0000
SubjectRe: Change the color of t
Message-ID<1182257157.856623.302130@q75g2000hsh.googlegroups.com>
In reply to#1862
  To: comp.lang.java.gui
On Jun 19, 4:47 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> The official way to do that would be to create your own custom look
> and feel variant.  seehttp://mindprod.com/jgloss/laf.html

Seems like you could simply install your own icon under the UIDefaults
key "CheckBoxUI.icon".  By default, you get the one manufactured by
BasicIconFactory.getCheckBoxIcon().

Laird

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1866 — Re: Change the color of t

From"Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this>
Date2011-04-27 15:35 +0000
SubjectRe: Change the color of t
Message-ID<4678255e$1@dnews.tpgi.com.au>
In reply to#1861
  To: comp.lang.java.gui

<deel007@googlemail.com> wrote in message 
news:1182242246.382044.43420@k79g2000hse.googlegroups.com...
> Hello,
>
> I am trying  to custumize a  JCheckbox by changing the color of the
> checkmark , but i dont know how !!
> any idea ?


Open the source code of MetalIconFactory
copy the static inner class CheckBoxIcon
add it as an inner class to your program
change the color in drawCheck()
set the new icon, either
a) use a CheckBox constructor with icon as argument, or
b) *both* checkbox.setIcon(...) and checkbox.setSelectedIcon(...)

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#1873 — Re: Change the color of t

Fromdeel007@googlemail.com.remove-dii-this
Date2011-04-27 15:35 +0000
SubjectRe: Change the color of t
Message-ID<1182382596.455615.203790@n2g2000hse.googlegroups.com>
In reply to#1866
  To: comp.lang.java.gui

>
> Open the source code of MetalIconFactory
> copy the static inner class CheckBoxIcon
> add it as an inner class to your program
> change the color in drawCheck()
> set the new icon, either
> a) use a CheckBox constructor with icon as argument, or
> b) *both* checkbox.setIcon(...) and checkbox.setSelectedIcon(...)

Thanks guys it works now.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web