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

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -