The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: jumping directly to uisetcolor "more color..." tab
Replies: 3   Last Post: Dec 2, 2012 4:23 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 11
From: Netherlands
Registered: 9/24/07
Re: jumping directly to uisetcolor "more color..." tab
Posted: Nov 30, 2012 4:58 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello Yair,

Thanks for the quick response. Your website was actually the first I looked at, and I found it really cool. Yet I am not very familiar with incorporating Java component in Matlab, so I fell back to uigetcolor. Now that you're here, can you enlighten me:
1. where is the Ok to confirm selection in every example of yours. How to get the return value. I managed to get the chosen color from

cc = javax.swing.JColorChooser;
>> [jColorChooser,container] = javacomponent(cc,[1,1,450,325],gcf);

by jColorChooser.getColor, but for

cp =,icon,'');
[jColorPicker,hContainer] = javacomponent(cp,[10,220,30,20],gcf);

jColorPicker.getColor is not valid.

2. In my design I'd like to have a square, then a color selection button next to it like
options = 0; icon = 0;
cp =,icon,'');
that will open the swatches of
cc = javax.swing.JColorChooser;

to pick the color for the square. I tried cc = javax.swing.JColorChooser(options, icon. '');
but failed, apparently because I dont know the function signature.

Where can I find more info on the prototype, methods, properties of components like ColorPicker, jColorPicker, JColorChooser, etc., to modify as will?
I do hope the anwer wont be "purchase my report/book".
many thanks.

"Yair Altman" wrote in message <k99o4f$4gc$>...
> "Hiep " <> wrote in message <k98pfn$arv$>...
> > Hi,
> >
> > I am exploring uisetcolor. How can we set control such that when I press color selection button (such as the example below) the color picker opens automatically Swatches (or HSB, or RGB) tab under 'More Color...'. I dont want to use the default swatches which has limited colors, because then the user has to switch to More Color... every time, which make them annoyed/bored/lose patience with my experiment.

> Don't use uisetcolor. Instead, create a simple dialog window with one of the built-in Java color components:
> Yair Altman
> Read my Matlab-Java programming book

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.