* starting from <code>comp</code> component.
* @param comp a component to get information from.
* @param writer a writer to write to.
*/
public static void dumpComponent(Component comp, final PrintWriter writer, final DumpController listener) {
QueueTool qt = new QueueTool();
Component[] comps;
if(comp != null) {
comps = new Component[1];
comps[0] = comp;
} else {
comps = Frame.getFrames();
}
final Component[] comps_final = comps;
qt.invokeAndWait(new QueueAction("dumpComponent") {
public Object launch() throws Exception {
printHeader(writer);
dumpSome("dump", comps_final, writer, "", listener);
writer.flush();
return null;