Unable to customize the button for my plugin
Answered
Hi Team,
I am unable to apply style (color) fully for my Button, when I try to do that it ends up coloring only the border.
Note: this button will be used in a plugin which will be deployed
Expected:
My Output:
My Implementation:
JButton test = new JButton("Test");
test.setPreferredSize(new Dimension(150,30));
test.setBackground(new Color(12,159,167));
jpanel.add(test);
Please sign in to leave a comment.
Plugins should not modify the colors of the UI's Look&Feel, as these colors are customizable by Theme plugins.
Yann Cebron How if I need to change the button to looks like red or blue based on positive and negative action scenario? Is there any API that can be used ?
Or if it cant, is there any methods or API to configure button as Primary or Secondary like this?
For
DialogWrapper
, you can set default button viacom.intellij.openapi.ui.DialogWrapper#DEFAULT_ACTION
and default focused button viacom.intellij.openapi.ui.DialogWrapper#FOCUSED_ACTION