Ola, pessoal bom dia! Será que alguém poderia me ajudar, estou aplicando uma interface, e estou utilizando o hibernate para persistir, só que quando executo este script não acontece nada!!
[code]package projeto;
import org.hibernate.SessionFactory;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
import org.hibernate.Transaction;
import javax.swing.JButton;
import javax.swing.JTextField;
import javax.swing.JLabel;
import java.awt.;
import java.awt.event.;
import javax.swing.JFrame;
@SuppressWarnings(“serial”)
public class Teste extends JFrame  implements ActionListener{
static SessionFactory factory;
JLabel lbnome, lbemail;
JTextField tfnome, tfemail;
JButton btinserir, btcancelar;
public Teste(){
super(“Insercao de Dados”);
Container cont = getContentPane();
cont.setLayout(new FlowLayout());
	lbnome = new JLabel("Nome:");
	cont.add(lbnome);
	tfnome = new JTextField(10);
	cont.add(tfnome);
	
	lbemail = new JLabel ("Email:");
	cont.add(lbemail);
	tfemail = new JTextField (20);
	cont.add(tfemail);
	
	btinserir = new JButton ("Inserir");
	cont.add(btinserir);
	//BotaoComando botao = new BotaoComando();
	btinserir.addActionListener(this);
	
	btcancelar = new JButton ("Cancelar");
	cont.add(btcancelar);
	btcancelar.addActionListener(this);
	cont.setSize(400,300);
	cont.setVisible(true);
	
}
public static void main (String[] args){
	new Teste();
}
	public void actionPerformed (ActionEvent e){
		if (e.getSource()==btinserir){
			Session sessao;
			Transaction transa;
			factory =new Configuration().configure().buildSessionFactory();
			sessao = factory.openSession();
			transa = sessao.beginTransaction();
			Pessoa pessoa= new Pessoa();
			pessoa.setNome(tfnome.getText());
			pessoa.setEmail(tfemail.getText());
			sessao.save(pessoa);
			transa.commit();
			sessao.close();
			System.out.println("Insercao Concluida");
		}
		if (e.getSource()==btcancelar)
			{
				System.exit(0);
			}
	
}
}[/code]