3

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?

APerson
  • 7,304
  • 5
  • 32
  • 48
  • 2
    The 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
  • 1
    For [example](http://stackoverflow.com/a/14262706/230513). – trashgod Feb 25 '13 at 17:07

1 Answers1

-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");