atarw / material-ui-swing

A modern, Material Design UI for Java Swing
MIT License
655 stars 87 forks source link

Query #51

Closed SyedFaraz55 closed 6 years ago

SyedFaraz55 commented 6 years ago

How can i change color of buttons and textfields ??

vincenzopalazzo commented 6 years ago

Hello @SyedFaraz55 , You can change the color of the buttons with the next code

nameYourVariable.setBackground (yourColor);

If you want to change the color to all buttons at the same time you can switch to UIManager, with the following code

UIManagerUI.put("button.background", MaterialColor.YOUR_COLOR)

The same goes for the other components, you can find a more or less complete list of UIManager's Key here: https://www.logicbig.com/tutorials/java-swing/ui-default.html

I hope I understand your question and have been of help.

SyedFaraz55 commented 6 years ago

please let me know can i use this production purpose as well, i really like it and i want to build my applications on that.

Thank you. :)

SyedFaraz55 commented 6 years ago

Hello @SyedFaraz55 , You can change the color of the buttons with the next code

nameYourVariable.setBackground (yourColor);

If you want to change the color to all buttons at the same time you can switch to UIManager, with the following code

UIManagerUI.put("button.background", MaterialColor.YOUR_COLOR)

The same goes for the other components, you can find a more or less complete list of UIManager's Key here: https://www.logicbig.com/tutorials/java-swing/ui-default.html

I hope I understand your question and have been of help.

please let me know can i use this production purpose as well, i really like it and i want to build my applications on that.

Thank you. :)

vincenzopalazzo commented 6 years ago

please let me know can i use this production purpose as well, i really like it and i want to build my applications on that. Thank you. :)

@SyedFaraz55 I'm glad that you like the project, I'm not the owner and creator of the project, I'm just a simple contributor who is learning, I do not think there are problems, I would like to; wait for the answer from @atarw

atarw commented 6 years ago

Yeah you can definitely use it for whatever you want!

SyedFaraz55 commented 6 years ago

Yeah you can definitely use it for whatever you want!

Ah that's great ! Thanks and i really like your project.. :1st_place_medal: