One trick you can do is create a dummy application that uses the look of Nimbus, create a JTable
and do something like
System.out.println (myTable.getUI ().getClass ().getName ());
At this point, you will find out which UI object is used to render the JTable
when using Nimbus LAF. You can use this class name when calling setUI (TableUI)
on a JTable
:
myTable.setUI (new ui_manager_class_name ());
As others have said, this is hardly recommended. LAFs are usually intended to be used as a whole, and not as part of 2-3 LAFs. Another way out would be to use MultiLookAndFeel
, but I never used it, so I'm not sure that it meets your needs, you should read the appropriate tutorial if you want to use it correctly.
source share