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);
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 = com.mathworks.mlwidgets.graphics.ColorPicker(options,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 <firstname.lastname@example.org>... > "Hiep " <email@example.com> wrote in message <firstname.lastname@example.org>... > > 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: http://UndocumentedMatlab.com/blog/color-selection-components/ > > Yair Altman > http://UndocumentedMatlab.com > Read my Matlab-Java programming book >