简体   繁体   中英

Methods of styling GUI components in java

I'm creating a user interface for a java standalone desktop application but the forms, text fields and tables I built using javax.swing and java.awt packages look quite dull. Are there any methods by which these components can be stylized so that they look more appealing (like those beautiful websites made with css and javascript) ?

You can set the background, border, foreground, etc of these components. Consult the API for useful functions.

Or you can change the look and feel of your entire program. Recommended reading: http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

You could use Look and Feel, there are libraries that set your all your components with a defined style.

See this link http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html

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