如何在Java中制作圆形图像标签?
如何在Java中制作圆形图像标签?
这样做。.嘿,伙计们。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
我想制作圆形图像标签,但我不能
请帮我...
How to make Circle image Label in Java?
I wanna make circle image Label But I can't do this.. Hey guys Help me..T.T
I tried make circle panel for add image icon but that didn't work.
help me please...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为您应该更改钉子,而不是尝试修改组件的输出,而是修改输入...
这一切都这样做,是将圆形(基于alpha的)掩码应用于另一个图像
的好处,您可以得到软剪辑(哪个
setClip
不提供)以及不要与组件的现有剪辑形状混乱,
applyqualityRenderingHints
...I think you should change your tack, instead of trying to modify the output of a component, instead, modify the input...
So all this does, is apply a circular (alpha based) mask to another image
The benefit of this is you can get soft clipping (which
setClip
doesn't provide) as well as not messing with the existing clipping shape of a componentAnd
applyQualityRenderingHints
...转到博客niceApplication1.blogspot.com,然后下载新的NICE应用程序1 Home Somendous,然后在提取后转到Dist文件夹并打开Java Jar nice Application 1,然后拿Jar nice_application_1_files,然后仅在某些中转换您的方法节省空间的行。
在JAR仅在您的文件位置添加以下方法和调用方法之后。
导入nice_application_1.icon;
private void addicon()抛出java.lang.nullpointerexception,ioexception {
//圆形形状图标,您可以与上述方法一起使用。
上面的示例,使用jbutton如果需要在弹出窗口中,请键入Joptionpane.showmessageDialog(null,new Jlabel(new Imageicon(Appli1)));
下载罐子后,您还可以获得更多优势。
Go to the blog NiceApplication1.BlogSpot.Com, and Download the new Nice Application 1 Home Stupendous, then after extract goes to the dist folder and open the Java Jar Nice Application 1, and take the jar Nice_Application_1_Files, and convert your method only in some lines for saving space.
After jar adds only the below method with your file location and call method.
import Nice_Application_1.Icon;
private void Addicon() throws java.lang.NullPointerException, IOException {
//Circle shape icon you can use with the above method.
Above example, with Jbutton if want in a popup so type JOptionPane.showMessageDialog(null, new JLabel(new ImageIcon(Appli1)));
After downloading the jar, you can also get more advantages.
您可以使用
区域
类创建剪辑区域:You can use the
Area
class to create a clip region: