有没有办法在Ubuntu下改善JFileChooser的外观和感觉? [英] Is there a way to improve JFileChooser look and feel under Ubuntu?

查看:158
本文介绍了有没有办法在Ubuntu下改善JFileChooser的外观和感觉?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在制作一个使用JFileChooser的程序。我已经设置了应用程序

I've been making a program that uses a JFileChooser. I've set the application up with


UIManager.getSystemLookAndFeelClassName()

UIManager.getSystemLookAndFeelClassName()

对于Ubuntu下的几乎所有东西都可以。到目前为止我遇到的唯一问题是JFileChooser看起来非常糟糕:

Which works just fine for pretty much everything under Ubuntu. The only problem I've run into so far is that the JFileChooser comes out looking pretty awful:

有没有办法让它看起来像Ubuntu中的默认文件选择器?即。

Is there a way to make this look like the default file chooser in Ubuntu? ie.

I尝试过使用


UIManager.getCrossPlatformLookAndFeelClassName()

UIManager.getCrossPlatformLookAndFeelClassName()

这使得JFileChooser对话框看起来更好,但仍然不是原生的,并且它也会破坏应用程序的其余部分。

Which makes the JFileChooser dialog look better, but still not native looking, and it ruins the rest off the application's feel too.

谢谢。

推荐答案

如果我没记错的话,股票JDK使用gtk1,但ubuntu目前使用gtk2。我忘了哪里但是我遇到了gtk2 for java somewhere。谷歌?可能不是你想要的,抱歉。

If I recall correctly, the stock JDK used gtk1, but ubuntu uses gtk2 currently. I forget where but i've come across gtk2 for java somewhere. Google? Probably not what you were hoping for, sorry.

这篇关于有没有办法在Ubuntu下改善JFileChooser的外观和感觉?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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