简体   繁体   中英

How to make Java Swing application developed in NetBeans not have hideous buttons?

I developed a Java application in Netbeans, and I'm going to release it soon so I'm working on making it less ugly. Since I'm developing on a Mac, the GUI builder uses the Mac Look & Feel, which looks decent, but many of my users won't be using Macs. The default L&F is Nimbus, which looks fine except for the buttons, which have annoying borders that are not overridden by the manually setting the borders (you can see how the manual borders look in the image). With the manually set borders, the Nimbus L&F adds its own odd border inside the border I made, which just looks idiotic. Without the manually set borders, Nimbus's borders overlap in visually unappealing ways, and in order to avoid overlap I have to space the buttons really far apart, which I also don't like.

I tried using the other L&Fs available in Netbeans (Metal and something else), but they're just too ugly to stand.

Basically, I would like some advice on how to customize the way buttons look in this application. I don't want to write a button drawing function from scratch or design my own images. I just want a way to change the settings so things don't look stupid. I read in various places that the Substance L&F is good, but I can't find where to download it anywhere. If someone could link me to a download page for Substance or recommend another popular, simple and not stupid-looking L&F, I would greatly appreciate it.

在 Mac L&F 下看起来不错

Yeah pretty much all the L&Fs you'll find in Netbeans are worse than the default. The program will use the default Look & Feel of the operating system - so if it's being run on Windows it will have the "Windows-esce" buttons and fonts and on Mac will have the Mac style.

It all depends on what you're looking for. If you're application is meant to be professional and you don't mind it having different styles depending on the OS of the user then I'd leave it as default. It lends familiarity to your program which can truly make the user feel much more comfortable.

If you're after an indetical look for all users then, as you know, you just need to include the L&F with your program. I couldn't find a download for Substance but there are a few L&F's here - both commercial and free.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM