开发者

Synth LaF Different Panel Styles

开发者 https://www.devze.com 2023-01-14 15:57 出处:网络
i have an app with two JPanels and they must have different styles. I use the Synth LaF and I don\'t know how to have two differ开发者_运维知识库ent styles in one xml file. I define a style and bind i

i have an app with two JPanels and they must have different styles. I use the Synth LaF and I don't know how to have two differ开发者_运维知识库ent styles in one xml file. I define a style and bind it to "Panel" but then both panels look alike. Is there a possibility to define more styles and let synth know which one it should use on which panel?


extracted from http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/synth.html:

The <bind> Element ...
type is either "name" or "region." If type is a name, obtain the name with the component.getName() method. ...

So, bind the style to a name, and give your panel names by calling setName

0

精彩评论

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

关注公众号