🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
4 messages
4 total messages Started by C�dric LAFFONT Thu, 02 Jun 2005 07:08
Remove a panel in a ColorChooser
#523
Author: C�dric LAFFONT
Date: Thu, 02 Jun 2005 07:08
13 lines
1234 bytes
Hello,
I try to remove the RGB panel in a ColorChooser but it doesn't work.
This is what I do:

JColorChooser chsrClr = new JColorChooser();
...
mainPanel.add(chsrClr);
...
AbstractColorChooserPanel ccp[] = chsrClr.getChooserPanels();
chsrClr.removeChooserPanel(ccp[2]);
chsrClr.repaint();

Thanks for your help.
Re: Remove a panel in a ColorChooser
#524
Author: Paul Furbacher [TeamB]
Date: Thu, 02 Jun 2005 12:10
35 lines
1867 bytes
C�dric LAFFONT wrote:

> I try to remove the RGB panel in a ColorChooser but it doesn't work.
> This is what I do:
> 
> JColorChooser chsrClr = new JColorChooser();
> ...
> mainPanel.add(chsrClr);
> ...
> AbstractColorChooserPanel ccp[] = chsrClr.getChooserPanels();
> chsrClr.removeChooserPanel(ccp[2]);
> chsrClr.repaint();

This is just an idea.  Once you identify the panel
just set its visibility to false.  That might be easier
than removing it.

As I said, this is just an idea.  I don't have time
to test it.


-- 


Paul Furbacher (TeamB)

   Save time, search the archives:
        http://www.borland.com/newsgroups/ngsearch.html

   Is it in Joi Ellis's Faq-O-Matic?
        http://www.visi.com/~gyles19/fom-serve/cache/1.html

   Finally, please send responses to the newsgroup only.
   That means, do not send email directly to me.
   Thank you.
Re: Remove a panel in a ColorChooser
#525
Author: C�dric LAFFONT
Date: Thu, 02 Jun 2005 13:40
42 lines
2242 bytes
Thank you but setting the visibility to false doesn't work better than my
method.
Any other idea?


"Paul Furbacher [TeamB]" <pfurbacher@mac.com> a �crit dans le message de
news:429ef737$1@newsgroups.borland.com...
> C�dric LAFFONT wrote:
>
> > I try to remove the RGB panel in a ColorChooser but it doesn't work.
> > This is what I do:
> >
> > JColorChooser chsrClr = new JColorChooser();
> > ...
> > mainPanel.add(chsrClr);
> > ...
> > AbstractColorChooserPanel ccp[] = chsrClr.getChooserPanels();
> > chsrClr.removeChooserPanel(ccp[2]);
> > chsrClr.repaint();
>
> This is just an idea.  Once you identify the panel
> just set its visibility to false.  That might be easier
> than removing it.
>
> As I said, this is just an idea.  I don't have time
> to test it.
>
>
> -- 
>
>
> Paul Furbacher (TeamB)
>
>    Save time, search the archives:
>         http://www.borland.com/newsgroups/ngsearch.html
>
>    Is it in Joi Ellis's Faq-O-Matic?
>         http://www.visi.com/~gyles19/fom-serve/cache/1.html
>
>    Finally, please send responses to the newsgroup only.
>    That means, do not send email directly to me.
>    Thank you.
Re: Remove a panel in a ColorChooser
#526
Author: John McGrath [TeamB]
Date: Thu, 02 Jun 2005 19:39
19 lines
1480 bytes
On 6/2/2005 at 3:08:34 AM, C�dric LAFFONT wrote:

> I try to remove the RGB panel in a ColorChooser but it doesn't work.
> This is what I do:
> 
> JColorChooser chsrClr = new JColorChooser();
[snip]

When I fill in enough code to make that runnable, it works fine for me.
Would you please post a runnable example that demonstrates the problem?

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads