Extends (Urgente) - Código fonte

package ergonosc;

import java.awt.;
import java.awt.event.
;
import javax.swing.;
import java.sql.
;

public class framebasico extends JDialog {
JPanel contentPane;
BorderLayout borderLayout1 = new BorderLayout();
Connection conn;

// construtor do frame
public framebasico(Connection c) {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
framebasicoInit();
conn = c;
}
catch (Exception e) {
e.printStackTrace();
}
}

//Centraliza frame
public void center(){
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = this.getSize();
if (frameSize.height > screenSize.height)
frameSize.height = screenSize.height;
if (frameSize.width > screenSize.width)
frameSize.width = screenSize.width;
this.setLocation((screenSize.width - frameSize.width) / 2,(screenSize.height - frameSize.height) / 2);
this.setVisible(true);
}

// Inicialização dos componentes
private void framebasicoInit() throws Exception {

contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(borderLayout1);
this.setEnabled(true);
this.setModal(true);
this.setResizable(false);

}

}


package ergonosc;

import java.awt.;
import java.awt.event.
;
import javax.swing.;
import java.sql.
;

public class teste extends framebasico {
// construtor do frame
Connection conn;
public teste() {
super.framebasico(conn);
}
}

:cry: :cry: :cry: :cry:

[color=“blue”]Após essas alterações que fiz, consegui compilar, o resto é com você…[/color]

[color="#444444"]package ergonosc;

import java.awt.;
import java.awt.event.
;
import javax.swing.;
import java.sql.
;

public class Teste extends FrameBasico {
// construtor do frame
static Connection conn;

public Teste()
{
super(conn);
}

} [/color]

[color=“blue”]***Espero ter te ajudado…[/color] :wink:

VALEU… :lol: