自定义Swing外观与自定义组件? [英] Custom Swing look and feel vs. custom components?

查看:128
本文介绍了自定义Swing外观与自定义组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Swing编写游戏,并希望为GUI实现独特的"steampunk"风格外观.这将需要一些动画组件,粗大的金属边框等.

I'm writing a game using Swing and want to achieve a distinctive "steampunk" inspired look for the GUI. This will require some animated components, chunky metallic borders etc.

我知道可以通过重写paintComponent并在该方法中对自定义轻型组件进行所有渲染来获得不错的效果.

I know that I can get nice effects by overriding paintComponent and doing all of my rendering for custom lightweight components in that method.

这是要走的路吗,还是我应该在开发一种全新的可插入外观和感觉?

Is this the way to go, or should I be looking at developing a whole new pluggable Look and Feel?

每种优点/缺点是什么?

What are the pros/cons of each?

推荐答案

我个人认为,您应该使用全新的外观和感觉...您也许还可以使用

Personally, I think you should go for a completely new look and feel... you may also be able to build it off of Synth L&F rather than writing everything on your own.

Nimbus 是L&的示例; F写在Synth之上.

Nimbus is an example of an L&F written on top of Synth.

这篇关于自定义Swing外观与自定义组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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