Is it possible to set the file used for the Synth look and feel of just a specific component or set of components on a Swing GUI without changing it for any of the other components?
Asked
Active
Viewed 1,009 times
3
-
2The LAF is assigned at the time the component is created. So you can set the LAF, create a component, then reset the LAF to the primary LAF. I'm not sure if this will work 100% of the time. – camickr Feb 25 '13 at 15:45
-
1For [example](http://stackoverflow.com/a/14262706/230513). – trashgod Feb 25 '13 at 17:07
1 Answers
-1
yes it is possible. Insted of giving type as "region" change it to "name", value to specific name which has given by setName("componentName"); method in your application.
Add this one
<style id="titleBarButtonsPanel">
<state>
<opaque value="false" /><!-- background of the title bar -->
<insets top="0" left="0" bottom="0" right="0" /><!-- size of the
title bar -->
<color value="red" type="BACKGROUND" />
<color value="white" type="FOREGROUND" />
</state>
</style> <bind style="titleBarButtonsPanel" type="name" key="NameOfSpecificComponent" />
In program add setName("NameOfSpecificComponent");

user2763652
- 1
- 2