I am not sure to understand what you really want to do with that code, or what do you mean with 'abort construction a window'.
First of all, your code has a few of errors:
1. CriarEquipamentoGUI is defined like the constructor of a class of the same name, but it is not enclosed in any class. I guess you decided to paste only the part of your interests.
2. The reason why the 'return' screws the problem is because you forgot to add brackets.
You have something like this:
if( do not show ) {
doSomething();
}
return; // The rest of code is unreachable.
else {
initComponents();
}
When you should have something like this:
if( do not show ) {
doSomething();
return;
} else {
initComponents();
}
3. I am not sure if this is what you want, but after all the components are ready, you can still decide not to have the window shown.
jframeInstance.setVisible(false); // although false is its default value.
That is all I can tell by now, if you need any more help then please expand your ideas a bit more.
~ Xhamolk_