开发者

Can I set two different look and field on one JFrame?

开发者 https://www.devze.com 2022-12-31 04:00 出处:网络
I wa开发者_StackOverflownt to set two different look and feel on one frame. I have two different panels in that.

I wa开发者_StackOverflownt to set two different look and feel on one frame.

I have two different panels in that.

i want to set two different look and feel for both.
Can I do that?

And if yes then how?


The look and feel is a (application) global setting. You can't individually combine different ones. How to set the look and feel is described here.


i think Not possible from Java look and feel classes as they are set for whole application like UIManager.setLookAndFeel();

so you have to do it from your own.


A components LAF is determined when the component is created. So theoretically you can do:

a) set LAF
b) create the component
c) reset the LAF to the default.

You may or may not encounter problems so use at your own risk.

0

精彩评论

暂无评论...
验证码 换一张
取 消