Boa tarde galera seguinte, eu tenho um JFrame com uma barra de menu e item de menus, nesses item de menus tenho um item chamando cadastro como faço quando ao clicar nesse item ele chamar a tela de cadastro?
vlw ae.
Boa tarde galera seguinte, eu tenho um JFrame com uma barra de menu e item de menus, nesses item de menus tenho um item chamando cadastro como faço quando ao clicar nesse item ele chamar a tela de cadastro?
vlw ae.
Cadastro cadastro = new Cadastro();
cadastro.setVisible(true);
this.dispose();
marcos eu tinha feito isso mas nao ta dando nao =[, o dispose() funciona ele fecha a tela mais nao chama a outra =[
o evento ta como actionPerformed
Olá, Everton!
Beleza?
Bom, primeiro, você deve fazer uso do evento do Menu…
No caso, você pode usar um actionListener para resolver seu problema.
Suponhamos assim:
JMenuItem cadastrosItem = new JMenuItem("Cadastrar"); // Essa é a opção que ativa os cadastros.
cadastrosItem.addActionListener(new CadastrosActionListener()); // Aqui é o listener dessa opção. Quando você clicar no item "Cadastrar" do menu, ativar-se-á essa opção.
E, agora, o que faz a opção:
private class CadastrosActionListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
MeuFormDeCadastros obj = new MeuFormDeCadastros();
obj.setVisible(true);
obj.dispose();
}
}
Faça o teste, e poste um reply para nós!
Espero ter ajudado!
[]'s
opa ai Nicolas olha so como que esta meu cod:
private void cadastroClientes(java.awt.event.ActionEvent evt) {
CadastroCliente cadastro = new CadastroCliente();
cadastro.setVisible(true);
this.dispose();
Everton…
Poste o código geral: qual o botão, ou item de menu, ou o que seja que está chamando o form, qual o método que você tá usando…
Posta o código todo. Ficará mais fácil de visualizar!
[]s
AQUI TA O FRAME COM OS ITENS DE MENUS
import java.util.Locale;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Exercicio.java
*
* Created on 19/10/2009, 11:11:45
*/
/**
*
* @author everton
*/
public class Exercicio extends javax.swing.JFrame {
/** Creates new form Exercicio */
public Exercicio() {
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() {
jPanel1 = new javax.swing.JPanel();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
botaoCadastro = new javax.swing.JMenuItem();
botaoListar = new javax.swing.JMenuItem();
botaoPesquisar = new javax.swing.JMenuItem();
botaoExcluir = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 279, Short.MAX_VALUE)
);
jMenu1.setText("File");
botaoCadastro.setText("Cadastro Clientes");
botaoCadastro.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cadastroClientes(evt);
}
});
jMenu1.add(botaoCadastro);
botaoListar.setText("Listar Clientes");
botaoListar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
listarClientes(evt);
}
});
jMenu1.add(botaoListar);
botaoPesquisar.setText("Pesquisar Clientes");
botaoPesquisar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
pesquisarClientes(evt);
}
});
jMenu1.add(botaoPesquisar);
botaoExcluir.setText("Excluir Clientes");
botaoExcluir.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
botaoExcluir(evt);
}
});
jMenu1.add(botaoExcluir);
jMenuBar1.add(jMenu1);
jMenu2.setText("Edit");
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
private void pesquisarClientes(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void listarClientes(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void cadastroClientes(java.awt.event.ActionEvent evt) {
CadastroCliente cadastro = new CadastroCliente();
cadastro.setVisible(true);
this.dispose();
}
private void botaoExcluir(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Exercicio().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JMenuItem botaoCadastro;
private javax.swing.JMenuItem botaoExcluir;
private javax.swing.JMenuItem botaoListar;
private javax.swing.JMenuItem botaoPesquisar;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JPanel jPanel1;
// End of variables declaration
}
AQUI O JPANEL QUE E PRA SER CHAMADO
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* CadastroCliente.java
*
* Created on 19/10/2009, 11:31:07
*/
/**
*
* @author everton
*/
public class CadastroCliente extends javax.swing.JPanel {
/** Creates new form CadastroCliente */
public CadastroCliente() {
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() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
botaoNome = new java.awt.TextField();
jLabel3 = new javax.swing.JLabel();
botaoID = new java.awt.TextField();
jLabel4 = new javax.swing.JLabel();
botaoCpf = new java.awt.TextField();
botaoCadastrar = new javax.swing.JButton();
botaoLimpar = new javax.swing.JButton();
jbotaoCancelar = new javax.swing.JButton();
setToolTipText("");
jLabel1.setFont(new java.awt.Font("Matura MT Script Capitals", 3, 24));
jLabel1.setText("Cadastro de Clientes");
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12));
jLabel2.setText("Nome");
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12));
jLabel3.setText("ID");
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12));
jLabel4.setText("Cpf");
botaoCadastrar.setText("Cadastrar");
botaoCadastrar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
botaoCadastrar(evt);
}
});
botaoLimpar.setText("Limpar");
botaoLimpar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
botaoLimpar(evt);
}
});
jbotaoCancelar.setText("Cancelar");
jbotaoCancelar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
botaoCancelar(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(169, Short.MAX_VALUE)
.addComponent(botaoCadastrar)
.addGap(18, 18, 18)
.addComponent(botaoLimpar)
.addGap(18, 18, 18)
.addComponent(jbotaoCancelar)
.addContainerGap())
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(botaoCpf, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(botaoID, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(botaoNome, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(272, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(103, Short.MAX_VALUE)
.addComponent(jLabel1)
.addGap(93, 93, 93))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(27, 27, 27)
.addComponent(jLabel1)
.addGap(53, 53, 53)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel3)
.addComponent(botaoID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(21, 21, 21)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(botaoNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(22, 22, 22)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel4)
.addComponent(botaoCpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 50, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jbotaoCancelar)
.addComponent(botaoLimpar)
.addComponent(botaoCadastrar))
.addContainerGap())
);
getAccessibleContext().setAccessibleName("cadastro");
}// </editor-fold>
private void botaoCadastrar(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void botaoLimpar(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void botaoCancelar(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
// Variables declaration - do not modify
private javax.swing.JButton botaoCadastrar;
private java.awt.TextField botaoCpf;
private java.awt.TextField botaoID;
private javax.swing.JButton botaoLimpar;
private java.awt.TextField botaoNome;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JButton jbotaoCancelar;
// End of variables declaration
}
Everton,
O seu código está errado pelo seguinte:
public class CadastroCliente extends javax.swing.JPanel
A classe estende um JPanel. Mas um JPanel deve ser colocado em algum objeto Container!
Crie sua classe estendendo um JFrame, ou um JDialog.
Aí sim funcionará!
[]'s
eu fiz isso ai mas agora disparou um erro segue o cod:
import java.util.Locale;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Exercicio.java
*
* Created on 19/10/2009, 11:11:45
*/
/**
*
* @author everton
*/
public class Exercicio extends javax.swing.JFrame {
/** Creates new form Exercicio */
public Exercicio() {
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() {
jPanel1 = new javax.swing.JPanel();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
botaoCadastro = new javax.swing.JMenuItem();
botaoListar = new javax.swing.JMenuItem();
botaoPesquisar = new javax.swing.JMenuItem();
botaoExcluir = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 279, Short.MAX_VALUE)
);
jMenu1.setText("File");
botaoCadastro.setText("Cadastro Clientes");
botaoCadastro.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cadastroClientes(evt);
}
});
jMenu1.add(botaoCadastro);
botaoListar.setText("Listar Clientes");
botaoListar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
listarClientes(evt);
}
});
jMenu1.add(botaoListar);
botaoPesquisar.setText("Pesquisar Clientes");
botaoPesquisar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
pesquisarClientes(evt);
}
});
jMenu1.add(botaoPesquisar);
botaoExcluir.setText("Excluir Clientes");
botaoExcluir.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
botaoExcluir(evt);
}
});
jMenu1.add(botaoExcluir);
jMenuBar1.add(jMenu1);
jMenu2.setText("Edit");
jMenuBar1.add(jMenu2);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
private void pesquisarClientes(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void listarClientes(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void cadastroClientes(java.awt.event.ActionEvent evt) {
Cadastro cadastro = new Cadastro();
cadastro.setVisible(true);
this.dispose();
}
private void botaoExcluir(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Exercicio().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JMenuItem botaoCadastro;
private javax.swing.JMenuItem botaoExcluir;
private javax.swing.JMenuItem botaoListar;
private javax.swing.JMenuItem botaoPesquisar;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JPanel jPanel1;
// End of variables declaration
}
ajuda ae galera?
resolvi aqui galera vlw ae.
Posta a Solução Para Ajudar os Demais!
Rapaaazz tem um tempao que eu abri esse topico, mas se vc tiver com alguma duvida fala ai…que agente tenta ajudar
e o seguinte criei um JFrame usando a paleta de componentes do swing adicionei alguns JLabel e alguns TexFild´s, sendo eles nomes endereço etc…
Gostaria de saber o metodo para chamar um outro JPanel ou JFrame com os Dados que eu Preencher no Primeiro JFrame.
e o seguinte criei um JFrame usando a paleta de componentes do swing adicionei alguns JLabel e alguns TexFild´s, sendo eles nomes endereço etc…
Gostaria de saber o metodo para chamar um outro JPanel ou JFrame com os Dados que eu Preencher no Primeiro JFrame.
Entao vc precisa criar um evento ou em um JButton ou em um JMenuItem ou em um JLabel por exemplo e dentro esse evento vc faz a chamada a um outro JFrame ou á um JDialog por exemplo:
se for um JButton vc cria um ActionListener(actionPerformed) se for um JLabel por exemplo vc pode fazer um MouseListener(MouseClicked).
um exemplo com JButton:
private void jButtonContratoActionPerformed(ActionEvent evt) {
// evento do jButtonContrato, onde quando clicado, e instanciado o JDialogContratos é passado para o construtor
// do JDialog meu frame GUI onde ele vai ser o pai do JDialog, á String e o nome na barra de titulo.
new JDialogContratos(gui, "Mascarenhas Barbosa Roscoe S/A Construções").setVisible(true);
}
Se vc tiver usando matisse do netbeans ou algum outro plugin ja vem as opçoes de implementar esses eventos porém nao é o mais indicado.
Este Frame criei usando a paleta de componentes do Swing no netbeans, gostaria que toda as informações digitadas nos TextFields e também todos os Rotulos apareçam em no Frame quando eu clicar no botão OK.
abraços!!!
public class FramePrincipal extends javax.swing.JFrame {
public FramePrincipal() {
initComponents();
setLocationRelativeTo(null);
}
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jLabel8 = new javax.swing.JLabel();
jRadioButton1 = new javax.swing.JRadioButton();
jRadioButton2 = new javax.swing.JRadioButton();
nome = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jTextField3 = new javax.swing.JTextField();
javax.swing.text.MaskFormatter masketel = null;
try{
masketel = new javax.swing.text.MaskFormatter("(##)####-####");
masketel.setPlaceholderCharacter('_');
}
catch (java.text.ParseException exc) {}
jFormattedTextField1 = new javax.swing.JFormattedTextField();
jLabel9 = new javax.swing.JLabel();
jComboBox1 = new javax.swing.JComboBox();
jTextField1 = new javax.swing.JTextField();
jTextField4 = new javax.swing.JTextField();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Cadastro"));
jLabel1.setText("Nome:");
jLabel2.setText("Endereço:");
jLabel3.setText("Telefone:");
jLabel5.setText("E-mail:");
jLabel6.setText("RG:");
jLabel7.setText("Sexo:");
jButton1.setText("OK");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jLabel8.setText("CPF:");
buttonGroup1.add(jRadioButton1);
jRadioButton1.setText("Feminino");
buttonGroup1.add(jRadioButton2);
jRadioButton2.setText("Masculino");
jLabel9.setText("Bairro:");
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "13 DE SETEMBRO", "31 DE MARÇO", "AEROPORTO", "ALVORADA", "ASA BRANCA", "BELA VISTA", "BURITIS", "CAÇARI", "CAIMBÉ", "CALUNGÁ", "CAMBARÁ", "CANARINHO", "CARANÃ", "CAUMÉ", "CENTENÁRIO", "CENTRO", "CIDADE SATÉLITE", "CINTURÃO VERDE", "DISTRITO INDUSTRIAL GOVERNADOR AQUILINO MOTA DURTE", "BAIRRO DOS ESTADOS", "DOUTOR SILVIO BOTELHO", "DOUTOR SILVIO LEITE", "EQUATORTIAL", "JARDIM CARANÃ", "JARDIM FLORESTA", "JARDIM PRIMAVERA", "JARDIM TROPICAL", "JOQUEI CLUBE", "LIBERDADE", "MARECHAL RODON", "MECEJANA", "NOSSA SENHORA DA APARECIDA", "NOVA CANAÃ", "NOVA CIDADE", "OLÍMPIO", "OPERÁRIO", "PARAVIANA", "PINTOLANDIA", "PISCICULTURA", "PRICUMÃ", "PROFESSORA ARACELI SOUTO MAIOR", "RAIAR DO SOL", "SANTA LUZIA", "SANTA TEREZA", "SÃO FRANCISCO", "SÃO PEDRO", "SÃO VICENTE", "SENADOR HELIO CAMPOS", "TANCREDO NEVES", "UNIÃO" }));
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(155, Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(135, 135, 135))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(33, 33, 33)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel7)
.addGap(18, 18, 18)
.addComponent(jRadioButton1)
.addGap(18, 18, 18)
.addComponent(jRadioButton2))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel2)
.addComponent(jLabel1)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel6)
.addComponent(jLabel9)
.addComponent(jLabel8))
.addGap(8, 8, 8)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
.addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
.addComponent(jComboBox1, 0, 195, Short.MAX_VALUE)
.addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
.addComponent(jFormattedTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
.addComponent(nome, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
.addComponent(jTextField2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE))))
.addGap(52, 52, 52))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(nome, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)tro plugin ja vem as opçoes de implementar esses eventos porém nao é
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel4)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField4, 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(jLabel7)tro plugin ja vem as opçoes de implementar esses eventos porém nao é
.addComponent(jRadioButton2)
.addComponent(jRadioButton1))
.addGap(18, 18, 18)
.addComponent(jButton1)
.addContainerGap())
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
pack();
}// </editor-fold>
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new FramePrincipal().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JButton jButton1;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JFormattedTextField jFormattedTextField1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JRadioButton jRadioButton1;
private javax.swing.JRadioButton jRadioButton2;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField3;
private javax.swing.JTextField jTextField4;
private javax.swing.JTextField nome;
// End of variables declaration
}