Hello everyone, from my main window, I am opening a new JDialog window and I want to send a parameter from the main

Opening the new window

ExtensionUI extensionUI = new ExtensionUI(this, true);
extensionUI.setVisible(true);

and from the main of this new class,

ExtensionUI dialog = new ExtensionUI(new javax.swing.JFrame(), true);

and then the constructor

public ExtensionUI(java.awt.Frame parent, boolean modal) {
super(parent, modal);
initComponents();
parent.printSomething();
}

in the main window I have a method println something, but I cant access thru parent.print();
isn't that parent the main itself or is it like an instance of the JFrame of the main instead? don't know if I explained myself

thanks!