Im using a custom Look & Feel and certain Swing components in my JPanel won print, why?
See similar discussion for JTable under J2TablePrinter above. We have since learned that JButton and other Swing components can have a similar problem with custom Look & Feel libraries like Kunststoff. The same workarounds can be used: 1) change your whole application to “Metal” (cross-platform) Look & Feel using UIManager.setLookAndFeel() 2) change the Look & Feel for the particular component (or a copy used only for printing) to “Metal” or “Basic” using setUI() 3) in the case of Kunststoff where the source code is available, you can modify KunststoffButtonUI.java and/or other component renderers by adding the same “instanceof” test given in the J2TablePrinter discussion above, causing those components to revert to “Metal” or “Basic” Look & Feel only when printing. Alternatively, you can disable the use of Kunststoff gradients for all component printing at one time by adding the “instanceof” test as the first line in the two drawGradient() methods in KunststoffUtilities.java.