faz assim cara cria no JBuilder X as telas do jeito q vc quer com layout null, dai anota todas as cordenadas.........
Depois vc cria as telas manualmente com layout null e usa as cordenadas...
fica bem legal, ja fiz isso....
package apresentacao;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.text.ParseException;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFormattedTextField;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
import javax.swing.text.MaskFormatter;
import regranegocio.CClientes;
import controle.CControle;
public class CFrameCadastroCliente extends JInternalFrame implements
ActionListener {
private JLabel labelNome;
private JFormattedTextField textoNome;
private JLabel labelEnd;
private JFormattedTextField textoEnd;
private JLabel labelBairro;
private JFormattedTextField textoBairro;
private JLabel labelTel;
private JFormattedTextField textoTel;
private JLabel labelCidade;
private JFormattedTextField textoCidade;
private JLabel labelCompl;
private JFormattedTextField textoCompl;
private JLabel labelCel;
private JLabel labelObservacao;
private JTextField textoObservacao;
private JFormattedTextField textoCel;
private JLabel labelCpf;
private JFormattedTextField textoCpf;
private JLabel labelEmail;
private JFormattedTextField textoEmail;
private JLabel labelCep;
private JFormattedTextField textoCep;
private JLabel labelDependentes;
private JRadioButton radioSim;
private JLabel labelNumeroCasa;
private JFormattedTextField textoNumeroCasa;
private JRadioButton radioNao;
private JButton botaoCadastrar;
private JButton botaoFechar;
private CControle controle;
private boolean erro;
private MaskFormatter formatonome;
private MaskFormatter formatobairro;
private MaskFormatter formatocidade;
private MaskFormatter formatotelefone;
private MaskFormatter formatocep;
private MaskFormatter formatocpf;
private MaskFormatter formatocel;
private MaskFormatter formatonumero;
private EventoCadastroCliente evento;
public CFrameCadastroCliente() {
super("Cadastro Cliente", true, true, true, true);
// TODO Auto-generated constructor stub
this.setSize(new Dimension(700, 370));
evento = new EventoCadastroCliente();
Container conteudo = getContentPane();
conteudo.setLayout(null);
labelNome = new JLabel("Nome");
labelNome.setBounds(14, 18, 84, 19);
textoNome = new JFormattedTextField();
textoNome.setToolTipText("Teste!!!");
textoNome.setBounds(70, 18, 578, 19);
textoNome.requestFocus();
textoNome.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoNome.addActionListener(evento);
labelEnd = new JLabel("Endereço");
labelEnd.setBounds(14, 46, 84, 19);
textoEnd = new JFormattedTextField();
textoEnd.setBounds(70, 46, 372, 19);
textoEnd.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoEnd.addActionListener(evento);
labelBairro = new JLabel("Bairro");
labelBairro.setBounds(465, 46, 84, 19);
textoBairro = new JFormattedTextField();
textoBairro.setBounds(506, 46, 142, 19);
textoBairro.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoBairro.addActionListener(evento);
labelTel = new JLabel("Telefone");
labelTel.setBounds(14, 102, 84, 19);
textoTel = new JFormattedTextField();
textoTel.setBounds(70, 102, 105, 19);
textoTel.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoTel.addActionListener(evento);
labelCidade = new JLabel("Cidade");
labelCidade.setBounds(14, 74, 84, 19);
textoCidade = new JFormattedTextField();
textoCidade.setBounds(70, 74, 161, 19);
textoCidade.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoCidade.addActionListener(evento);
labelCompl = new JLabel("Complemento");
labelCompl.setBounds(267, 74, 84, 19);
textoCompl = new JFormattedTextField();
textoCompl.setBounds(349, 74, 105, 19);
textoCompl.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoCompl.addActionListener(evento);
labelCel = new JLabel("Celular");
labelCel.setBounds(242, 102, 84, 19);
textoCel = new JFormattedTextField();
textoCel.setBounds(289, 102, 105, 19);
textoCel.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoCel.addActionListener(evento);
labelNumeroCasa = new JLabel("Número");
labelNumeroCasa.setBounds(465, 102,84,19);
textoNumeroCasa = new JFormattedTextField();
textoNumeroCasa.setBounds(506,102,130,19);
textoNumeroCasa.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
JComponent.WHEN_FOCUSED);
labelCpf = new JLabel("CPF");
labelCpf.setBounds(267, 130, 84, 19);
textoCpf = new JFormattedTextField();
textoCpf.setBounds(302, 130, 120, 19);
textoCpf.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoCpf.addActionListener(evento);
labelEmail = new JLabel("e-mail");
labelEmail.setBounds(14, 158, 84, 19);
textoEmail = new JFormattedTextField();
textoEmail.setBounds(70, 158, 441, 19);
textoEmail.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoEmail.addActionListener(evento);
labelCep = new JLabel("CEP");
labelCep.setBounds(485, 74, 84, 19);
textoCep = new JFormattedTextField();
textoCep.setBounds(512, 74, 136, 19);
textoCep.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoCep.addActionListener(evento);
labelObservacao = new JLabel("Observação:");
labelObservacao.setBounds(14,186,100,19);
textoObservacao = new JTextField();
textoObservacao.setBounds(14,205,578,50);
textoObservacao.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
textoObservacao.addActionListener(evento);
botaoCadastrar = new JButton("Cadastrar");
botaoCadastrar.setBounds(361, 290, 127, 35);
botaoCadastrar.setMnemonic('C');
botaoCadastrar.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
botaoCadastrar.addActionListener(evento);
botaoFechar = new JButton("Fechar");
botaoFechar.setBounds(518, 290, 127, 35);
botaoFechar.setMnemonic('F');
botaoFechar.registerKeyboardAction(evento,
KeyStroke.getKeyStroke(KeyEvent.
VK_ENTER, 0), JComponent.WHEN_FOCUSED);
botaoFechar.addActionListener(evento);
controle = new CControle();
try {
formatonome = new MaskFormatter("*****************************************************");
formatobairro = new MaskFormatter("******************************************");
formatocidade = new MaskFormatter("******************************************");
formatotelefone = new MaskFormatter("########");
formatocel = new MaskFormatter("########");
formatocep = new MaskFormatter("#########");
formatocpf = new MaskFormatter("###########");
formatonumero = new MaskFormatter("#######");
formatonome.setValidCharacters(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
formatonome.install(textoNome);
formatobairro.setValidCharacters(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
formatobairro.install(textoBairro);
formatocidade.setValidCharacters(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
formatocidade.install(textoCidade);
formatocep.setValidCharacters("[telefone removido]");
formatocep.install(textoCep);
formatotelefone.setValidCharacters("[telefone removido]");
formatotelefone.install(textoTel);
formatocel.setValidCharacters("[telefone removido]");
formatocel.install(textoCel);
formatocpf.setValidCharacters("[telefone removido]");
formatocpf.install(textoCpf);
formatonumero.setValidCharacters("[telefone removido]");
formatonumero.install(textoNumeroCasa);
}
catch (ParseException e) {
System.out.print("Nao deu de novo");
}
conteudo.add(labelNome);
conteudo.add(textoNome);
conteudo.add(labelEnd);
conteudo.add(textoEnd);
conteudo.add(labelBairro);
conteudo.add(textoBairro);
conteudo.add(labelTel);
conteudo.add(textoTel);
conteudo.add(labelCidade);
conteudo.add(textoCidade);
conteudo.add(labelCompl);
conteudo.add(textoCompl);
conteudo.add(labelCel);
conteudo.add(textoCel);
conteudo.add(labelCpf);
conteudo.add(textoCpf);
conteudo.add(labelEmail);
conteudo.add(textoEmail);
conteudo.add(botaoCadastrar);
conteudo.add(botaoFechar);
conteudo.add(labelCep);
conteudo.add(textoCep);
conteudo.add(labelNumeroCasa);
conteudo.add(textoNumeroCasa);
conteudo.add(labelObservacao);
conteudo.add(textoObservacao);
}
public boolean verificaTextos() {
erro = true;
while (erro) {
if (textoNome.getText().trim().equals("")) {
textoNome.requestFocus();
JOptionPane.showMessageDialog(null,
"Campo Nome não pode estar vazio!!!",
"Locadora Video Force", 0);
break;
} else if (textoEnd.getText().trim().equals("")) {
textoEnd.requestFocus();
JOptionPane.showMessageDialog(null,
"Campo Endereço não pode estar vazio!!!",
"Locadora Video Force", 0);
break;
}else if (textoBairro.getText().trim().equals("")) {
textoBairro.requestFocus();
JOptionPane.showMessageDialog(null,
"Campo Bairro não pode estar vazio!!!",
"Locadora Video Force", 0);
break;
}else if (textoCidade.getText().trim().equals("")) {
textoCidade.requestFocus();
JOptionPane.showMessageDialog(null,
"Campo Cidade não pode estar vazio!!!",
"Locadora Video Force", 0);
break;
}else if (textoCep.getText().trim().equals("")) {
textoCep.requestFocus();
JOptionPane.showMessageDialog(null,
"Campo CEP não pode estar vazio!!!",
"Locadora Video Force", 0);
break;
}else if (textoCompl.getText().trim().equals("")) {
textoCompl.requestFocus();
JOptionPane.showMessageDialog(null,
"Campo Complemento não pode estar vazio!!!",
"Locadora Video Force", 0);
break;
}else if (textoTel.getText().trim().equals("")) {
textoTel.requestFocus();
JOptionPane.showMessageDialog(null,
"Campo Telefone não pode estar vazio!!!",
"Locadora Video Force", 0);
break;
}else if (textoCpf.getText().trim().equals("")) {
textoCpf.requestFocus();
JOptionPane.showMessageDialog(null,
"Campo CPF não pode estar vazio!!!",
"Locadora Video Force", 0);
break;
} else {
erro = false;
}
}
return erro;
}
class EventoCadastroCliente implements ActionListener {
public void actionPerformed(ActionEvent evento) {
if (evento.getSource() == textoNome) {
textoEnd.requestFocus();
}
if (evento.getSource() == textoEnd) {
textoBairro.requestFocus();
}
if (evento.getSource() == textoBairro) {
textoCidade.requestFocus();
}
if (evento.getSource() == textoCidade) {
textoCompl.requestFocus();
}
if (evento.getSource() == textoCep) {
textoTel.requestFocus();
}
if (evento.getSource() == textoCompl) {
textoCep.requestFocus();
}
if (evento.getSource() == textoTel) {
textoCel.requestFocus();
}
if (evento.getSource() == textoCel) {
textoNumeroCasa.requestFocus();
}
if (evento.getSource() == textoNumeroCasa) {
textoCpf.requestFocus();
}
if (evento.getSource() == textoEmail) {
textoObservacao.requestFocus();
}
if (evento.getSource() == textoCpf) {
textoEmail.requestFocus();
}
if (evento.getSource() == textoObservacao) {
botaoCadastrar.requestFocus();
}
if (evento.getSource() == botaoCadastrar) {
CClientes temp = new CClientes();
verificaTextos();
if (erro == false) {
temp.setNome(textoNome.getText());
temp.setEndereco(textoEnd.getText());
temp.setBairro(textoBairro.getText());
temp.setCidade(textoCidade.getText());
temp.setCep(Integer.parseInt(textoCep.getText().trim()));
temp.setComplemento(textoCompl.getText());
temp.setTel(Integer.parseInt(textoTel.getText().trim()));
if (!textoCel.getText().trim().equals("")){
temp.setCelular(Integer.parseInt(textoCel.getText().trim()));
}else {temp.setCelular(0);}
temp.setEmail(textoEmail.getText());
temp.setCpf(Long.parseLong(textoCpf.getText().trim()));
temp.setNumerocasa(Long.parseLong(textoNumeroCasa.getText().trim()));
temp.setObservacao(textoObservacao.getText());
try {
controle.cadastrarCliente(temp);
} catch (Exception e) {
e.printStackTrace();
}
textoNome.setText("");
textoEnd.setText("");
textoBairro.setText("");
textoCidade.setText("");
textoCep.setText("");
textoCompl.setText("");
textoTel.setText("");
textoCel.setText("");
textoEmail.setText("");
textoCpf.setText("");
textoNumeroCasa.setText("");
textoObservacao.setText("");
textoNome.requestFocus();
}
}
if (evento.getSource() == botaoFechar) {
dispose();
}
if (evento.getSource() == radioSim) {
radioNao.setSelected(false);
}
if (evento.getSource() == radioNao) {
radioSim.setSelected(false);
}
}
}
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
}
}