开发者

setLookAndFeel and NullPointerException

Has anyone ever tried to change swing's look and feel? Th开发者_JAVA技巧is code, taken from an example, simply yields a null pointer exception, and I wonder what might be wrong:

(javax.swing.UIManager/setLookAndFeel 
  (javax.swing.UIManager/getSystemLookAndFeelClassName))

Thanks!


Try this:

(prn "LAFs:" (map #(.toString %) 
  (javax.swing.UIManager/getInstalledLookAndFeels)))

to get a list of installed L&Fs; then you can hand-pick one you like.

Not a complete solution (I agree with Brian that your code Should Simply Work™) but this should at least give you some options.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜