Customizing the appearance is one place where Swing's age shows. It is possible to create a custom "Look and Feel", but it is not as easy as HTML / CSS:
https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/
JavaFX does allow CSS to be used to style it:
https://docs.oracle.com/javase/8/javafx/user-interface-tutor...