Look and Feel in java

Asked

Viewed 184 times

1

I have an application that uses Windows Look and Feel. However I have a problem where the user can have a computer with Windows XP, and everything is stylized with windows XP.

It’s like the application has the look and Feel of compilation (or something of the genre), because I use Windows 10 and I would like the application to have this look in the client as well. Here at the company we use Nimbus, but this look and Feel is long overdue, and I would like to try to give a new face to the system.

1 answer

7

Natively not, because you are probably using the lookandfeel(LAF) that adapts the appearance of the application according to the window manager of the running system, and in this case, it will adapt according to the OS in which it is running.

Besides the Nimbus, there’s the LAF javax.swing.plaf.metal natively, both are cross-Platform, but maybe his appearance isn’t so interesting either. In addition, if you want to keep the appearance independent of the running system, you will need create your own LAF or use someone’s custom. Usually these custom solutions are found only paid, or free to test and watermarked.

Swing is unfortunately already, by itself, very outdated and forgotten, even for being a very old desktop technology, so it is difficult to find a solution simpler and that does not cost to buy a theme. If you really need a java desktop application and want to customize, I suggest you read the API javafx, In addition to being more current, it is more flexible in terms of customization, and even features similar to the web, such as style sheets.


Reference:

  • The problem is that I have an entire application made in Swing, having to redo it in Javafx would take a long time... But anyway, I just wanted some Nfl to stay the same in every SOS without being too ugly. Because the problem, according to my boss, is that in different versions of the OS windows Lnf does not work very well

  • 2

    @William then you only have the two options I mentioned: find some third-party LAF and buy it or study how to create one and make your own.

  • 1

    I think the last major LAF investment there was was Nimbus at the end of the Sun era, along with Javafx. After that, very little was invested in this area, because Oracle have little interest in this and the little that had was almost all for Javafx.

  • Unfortunately Nimbus was the only thing I had left, leaving the system with that different windows XP face

Browser other questions tagged

You are not signed in. Login or sign up in order to post.