简体   繁体   中英

AWTUtilities.setWindowOpaque is causing some text painting issues

I am attempting to create an opaque JWindow with antialiased rounded corners. In doing so, I call the method:

AWTUtilities.setWindowOpaque(this, false);

And use a custom JPanel which paints the actual rounded corners.

Within the window, I have a JList . Whenever setWindowOpaque is set to false, the text within the JList becomes "distorted" slightly (ie it is still readable but it is noticable).

I'm trying to figure out exactly how to resolve this issue. It is possible to set the window shape itself using AWTUtilities.setWindowShape but this results in a non-antialiased shape.

For the record, I'm testing this on a Windows 7 machine with JDK 1.6 update 20.

请记住:如果使用Sun类,则代码只能在Sun JRE上运行,而不能在IBM,Blackdown和IcedTea上运行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM