I Want to set gradient background color for JToolBar in Java.
Am able to set this gradient effect for JPanel.
Thanks,
Sathish
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Like any other Swing component, you must override its
paintComponent(...)method. For instance,If you want this gradient to show through the components on the
JToolBar, you must invokesetOpaque(false)on each of those components.