[英]Using ColorPanel from JColorChooser
So in second (HSV) tab, default JColorChooser
has several elements, two of them being colorful and rest sliders and spinners. 因此,在第二个(HSV)选项卡中,默认的JColorChooser
有几个元素,其中两个是彩色元素,其余是滑块和微调器。
I want to use only the two colorful elements, which I have identified as ColorPanel
(at least one of them) . 我只想使用两个色彩鲜艳的元素(我已将其识别为ColorPanel
(至少其中之一) 。 But those classes aren't public and I can't access them. 但是这些课程不是公开的 ,我无法访问它们。
Is there a way to use them anyway? 反正有办法使用它们吗?
You can actually access them through a color chooser like so: 您实际上可以通过颜色选择器访问它们,如下所示:
JColorChooser cc = new JColorChooser();
AbstractColorChooserPanel[] panels = cc.getChooserPanels();
Also check out this question: Modifying a color chooser panel 还要检查以下问题: 修改颜色选择器面板
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.