Quero que quando a validação der tudo ok o jframe diga cadastrado se não a ponte tem campo faltando me ajuda ai pfv
package trabalho;
import javax.swing.JFormattedTextField;
import javax.swing.JOptionPane;
public class NewJFrame extends javax.swing.JFrame {
/**
* Creates new form NewJFrame
*/
public NewJFrame() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
jList1 = new javax.swing.JList<>();
buttonGroup1 = new javax.swing.ButtonGroup();
txt_CF = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
lbl_Nome = new javax.swing.JLabel();
txt_nome = new javax.swing.JTextField();
lbl_Cpf = new javax.swing.JLabel();
lbl_telefone = new javax.swing.JLabel();
txt_telefone = new javax.swing.JTextField();
lbl_email = new javax.swing.JLabel();
txt_email = new javax.swing.JTextField();
lbl_Nascimento = new javax.swing.JLabel();
txt_data = new javax.swing.JFormattedTextField();
lbl_Rg = new javax.swing.JLabel();
lbl_endereço = new javax.swing.JLabel();
txt_endereço = new javax.swing.JTextField();
lbl_celular = new javax.swing.JLabel();
txt_celular = new javax.swing.JTextField();
lbl_Admissão = new javax.swing.JLabel();
lbl_Sexo = new javax.swing.JLabel();
jRadioButtonM = new javax.swing.JRadioButton();
jRadioButtonF = new javax.swing.JRadioButton();
lbl_senha = new javax.swing.JLabel();
btn_cadastra = new javax.swing.JButton();
btn_cancelar = new javax.swing.JButton();
btnLimpar = new javax.swing.JButton();
txt_admissao = new javax.swing.JFormattedTextField();
txt_rg = new javax.swing.JFormattedTextField();
txt_cpf = new javax.swing.JFormattedTextField();
txt_senha = new javax.swing.JFormattedTextField();
jList1.setModel(new javax.swing.AbstractListModel<String>() {
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
public int getSize() { return strings.length; }
public String getElementAt(int i) { return strings[i]; }
});
jScrollPane1.setViewportView(jList1);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Tecword");
txt_CF.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
txt_CF.setText("Cadastro de Funcionarios ");
jPanel1.setBackground(new java.awt.Color(204, 204, 204));
jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
lbl_Nome.setText("Nome :");
txt_nome.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
txt_nomeKeyTyped(evt);
}
});
lbl_Cpf.setText("CPF :");
lbl_telefone.setText("Telefone :");
txt_telefone.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
txt_telefoneKeyTyped(evt);
}
});
lbl_email.setText("E-mail :");
txt_email.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
txt_emailKeyTyped(evt);
}
});
lbl_Nascimento.setText("Data de Nascimento :");
try {
txt_data.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
txt_data.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
txt_dataKeyTyped(evt);
}
});
lbl_Rg.setText("RG :");
lbl_endereço.setText("Endereço : ");
txt_endereço.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
txt_endereçoKeyTyped(evt);
}
});
lbl_celular.setText("celular :");
lbl_Admissão.setText("Data de Admissão :");
lbl_Sexo.setText("Sexo :");
jRadioButtonM.setBackground(new java.awt.Color(204, 204, 204));
buttonGroup1.add(jRadioButtonM);
jRadioButtonM.setText("Masculino");
jRadioButtonF.setBackground(new java.awt.Color(204, 204, 204));
buttonGroup1.add(jRadioButtonF);
jRadioButtonF.setText("Feminino");
lbl_senha.setText("Senha :");
btn_cadastra.setBackground(new java.awt.Color(204, 204, 204));
btn_cadastra.setText("Cadastrar");
btn_cadastra.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_cadastraActionPerformed(evt);
}
});
btn_cancelar.setBackground(new java.awt.Color(204, 204, 204));
btn_cancelar.setText("Cancelar");
btn_cancelar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_cancelarActionPerformed(evt);
}
});
btnLimpar.setText("Limpar");
btnLimpar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnLimparActionPerformed(evt);
}
});
try {
txt_admissao.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
txt_admissao.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
txt_admissaoKeyTyped(evt);
}
});
try {
txt_rg.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("#########")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
txt_rg.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
txt_rgKeyTyped(evt);
}
});
try {
txt_cpf.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###-###-###-##")));
} catch (java.text.ParseException ex) {
ex.printStackTrace();
}
txt_cpf.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
txt_cpfKeyTyped(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(lbl_Sexo)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jRadioButtonM))
.addComponent(lbl_Nascimento))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(txt_data, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(lbl_Admissão)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txt_admissao, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jRadioButtonF)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(lbl_telefone, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txt_telefone, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lbl_celular)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txt_celular, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(lbl_Nome, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txt_nome, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(lbl_endereço, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txt_endereço))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(lbl_Rg)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(txt_rg, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(lbl_Cpf)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txt_cpf, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(28, 28, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lbl_email)
.addComponent(lbl_senha))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txt_email, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_senha, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 0, Short.MAX_VALUE))))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btn_cadastra)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnLimpar)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btn_cancelar)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(33, 33, 33)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbl_Nome, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbl_endereço, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_endereço, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(15, 15, 15)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbl_Sexo)
.addComponent(jRadioButtonM, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jRadioButtonF, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(10, 10, 10)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbl_Nascimento)
.addComponent(txt_data, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lbl_Admissão)
.addComponent(txt_admissao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbl_telefone, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_telefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lbl_celular)
.addComponent(txt_celular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(9, 9, 9)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbl_Rg)
.addComponent(lbl_Cpf, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_rg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_cpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbl_email, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbl_senha)
.addComponent(txt_senha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btn_cancelar)
.addComponent(btnLimpar)
.addComponent(btn_cadastra)))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(txt_CF)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(19, 19, 19)
.addComponent(txt_CF)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
pack();
}// </editor-fold>
private void btn_cadastraActionPerformed(java.awt.event.ActionEvent evt) {
Validar();
/* Validar2(txt_codigo);
Validar2(txt_cpf);
Validar2(txt_rg);*/
}
/*public void Validar2(JFormattedTextField txt_exemplo) {
if(txt_exemplo.getText().equals(""))
{
JOptionPane.showMessageDialog(this, "O campo é obrigatório!");
txt_exemplo.requestFocus();
}
}*/
/* public void Validar2(String exemplo_txt) {
if(txt_cpf.getText().equals("")) {
JOptionPane.showMessageDialog(this, "Campo " + exemplo_txt + " é obrigatório!");
txt_cpf.requestFocus();
}
}*/
public void Validar(){
if(txt_nome.getText().equals(""))
{
JOptionPane.showMessageDialog(null,"campo Nome obrigatorio","Aviso",JOptionPane.WARNING_MESSAGE);
txt_nome.requestFocus();
}
if(txt_cpf.getText().equals(" - - - "))
{
JOptionPane.showMessageDialog(null,"campo CPF obrigatorio","Aviso",JOptionPane.WARNING_MESSAGE);
txt_cpf.requestFocus();
}
if(txt_rg.getText().equals(" "))
{
JOptionPane.showMessageDialog(null,"campo RG obrigatorio", "Aviso", JOptionPane.WARNING_MESSAGE);
txt_rg.requestFocus();
}
}
public void Limpar(){
txt_cpf .setText("");
txt_nome.setText("");
txt_telefone.setText("");
txt_email.setText("");
txt_rg.setText("");
txt_endereço.setText("");
txt_celular.setText("");
txt_admissao.setText("");
txt_senha.setText("");
}
private void btnLimparActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Limpar();
}
private void btn_cancelarActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
private void txt_cpfKeyTyped(java.awt.event.KeyEvent evt) {
String caracteres="0123456789";
if(!caracteres.contains(evt.getKeyChar()+"")){
evt.consume();
}
}
private void txt_rgKeyTyped(java.awt.event.KeyEvent evt) {
String caracteres="0123456789";
if(!caracteres.contains(evt.getKeyChar()+"")){
evt.consume();
}
}
private void txt_dataKeyTyped(java.awt.event.KeyEvent evt) {
String caracteres="0123456789";
if(!caracteres.contains(evt.getKeyChar()+"")){
evt.consume();
}
}
private void txt_admissaoKeyTyped(java.awt.event.KeyEvent evt) {
String caracteres="0123456789";
if(!caracteres.contains(evt.getKeyChar()+"")){
evt.consume();
} // TODO add your handling code here:
}
private void txt_telefoneKeyTyped(java.awt.event.KeyEvent evt) {
String caracteres="0123456789";
if(!caracteres.contains(evt.getKeyChar()+"")){
evt.consume();
}
}
private void txt_endereçoKeyTyped(java.awt.event.KeyEvent evt) {
String caracteres="aAbBcCdDeEfFgGhHiIjJlkKmMnNoOpPqQrRsStTuUvVwWxXyYzZ 0123456789 ";
if(!caracteres.contains(evt.getKeyChar()+"")){
evt.consume();
}
// TODO add your handling code here:
}
private void txt_nomeKeyTyped(java.awt.event.KeyEvent evt) {
String caracteres="aAbBcCdDeEfFgGhHiIjJlkKmMnNoOpPqQrRsStTuUvVwWxXyYzZ";
if(!caracteres.contains(evt.getKeyChar()+"")){
evt.consume();
}
}
private void txt_emailKeyTyped(java.awt.event.KeyEvent evt) {
String caracteres="aAbBcCdDeEfFgGhHiIjJlkKmMnNoOpPqQrRsStTuUvVwWxXyYzZ 0123456789 @_-#";
if(!caracteres.contains(evt.getKeyChar()+"")){
evt.consume();
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
}
});
}