Here you can find the source of traceSubstanceApiUsage(Component comp, String message)
public static void traceSubstanceApiUsage(Component comp, String message)
//package com.java2s; import java.awt.*; import javax.swing.*; public class Main { public static void traceSubstanceApiUsage(Component comp, String message) { Window w = SwingUtilities.getWindowAncestor(comp); String wTitle = null;/*w w w. j a v a2 s.c o m*/ if (w instanceof Frame) { wTitle = ((Frame) w).getTitle(); } if (w instanceof Dialog) { wTitle = ((Dialog) w).getTitle(); } throw new IllegalArgumentException(message + " [component " + comp.getClass().getSimpleName() + " in window " + w.getClass().getSimpleName() + ":'" + wTitle + "' under " + UIManager.getLookAndFeel().getName() + "]"); } }