java - Setting background color for each tab in JTabbedPane -


looking @ example, have create form like: enter image description here

if press tab button, change color of background according color of button.

here code that:

private void jtabbedpane1mouseclicked(java.awt.event.mouseevent evt) {                                               getcontentpane().setbackground(color.yellow) }; 

and result:

enter image description here

my problem is: can't set color whole background, , can't change variable name of tab, can't set different events different colors each tab. says 2 components in same form cannot have same name

any appreciated.


Comments

Popular posts from this blog

How to use SUM() in MySQL for calculated values -

ios - IBOutlet for image button not correctly referencing button after recreating outlet -

java - AEM: 403 Forbidden occurs when call a Post servlet -