List of usage examples for javax.swing JComponent getParent
public Container getParent()
From source file:net.sourceforge.squirrel_sql.fw.gui.debug.DebugEventListener.java
private void printDebugInfo(JComponent source, AWTEvent event) { Container parent = source.getParent(); String sourceName = source.getName(); String sourceClassName = source.getClass().toString(); String parentName = parent == null ? null : parent.getName(); String parentClassName = parent == null ? null : parent.getClass().toString(); StringBuilder msg = new StringBuilder(getEventMessagePrefix(event)); msg.append("\n"); msg.append("\t sourceName:").append(sourceName).append("\n"); msg.append("\t sourceClassName:").append(sourceClassName).append("\n"); msg.append("\t parentName:").append(parentName).append("\n"); msg.append("\t parentClassName:").append(parentClassName); System.out.println(msg.toString()); }