创建一个舍入的JFrame / ContentPane [英] Create a rounded JFrame / ContentPane

查看:185
本文介绍了创建一个舍入的JFrame / ContentPane的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个带圆角的登录窗口。一切都很好,请参阅图片,但我遇到了使JFrame / ContentPane透明化的挑战。每个角落都有白色区域(箭头所示),我似乎无法删除,因为我无法为JFrame或ContentPane将opague设置为false。

I'm creating a login window with rounded corners in java. Everything is OK, see pic, but i'm having challenges making the JFrame / ContentPane transparent. There are white areas at each corner (shown by the arrows) that i seem not to be able to remove since i can't set opague to false for the JFrame or ContentPane.

如何删除这些白色区域的任何想法
alt text http://i39.tinypic.com/dmsile。 png

Any ideas of how i can remove these white areas alt text http://i39.tinypic.com/dmsile.png

推荐答案

对你没什么帮助,但Java7将支持透明和形状的窗口:此处有更多信息。这些已在Java 6u10中提供,但不是公开的,即,您需要使用不受支持的com.sun ...类,以后可能会更改并破坏您的程序。

Not much help to you but Java7 will support transparent and shaped windows: More info here. These are available already in Java 6u10 but not publicly, ie, you need to use an unsupported com.sun... class that might change in future and break your program.

这篇关于创建一个舍入的JFrame / ContentPane的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆