Está apresentando o erro ao compilar: cannot find symbol constructor Tratador(); Separei o código em diversas classes e quando vou compilar acontece isso.
Alguém poderia ajudar? Vejam o código:
import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class PainelControle extends JPanel{
private JButton b1, b2, b3, b4;
private JTextField c1, c2, c3, c4, c5, c6, c7;
private JLabel l1, l2, l3, l4, l5, l6, l7;
private JPanel p1, p2;
private Tratador tr;
public PainelControle(){
tr = new Tratador();
p1 = new JPanel();
p2 = new JPanel();
p1.setLayout(new GridLayout(0,2,0,6));
p2.setLayout(new GridLayout(0,2,2,8));
l1 = new JLabel ("nome:");
l2 = new JLabel ("endereço:");
l3 = new JLabel ("bairro:");
l4 = new JLabel ("cep:");
l5 = new JLabel ("cidade:");
l6 = new JLabel ("profissão:");
l7 = new JLabel ("modalidade física:");
c1 = new JTextField (15);
c2 = new JTextField (15);
c3 = new JTextField (15);
c4 = new JTextField (15);
c5 = new JTextField (15);
c6 = new JTextField (15);
c7 = new JTextField (15);
p1.add(l1);
p1.add(c1);
p1.add(l2);
p1.add(c2);
p1.add(l3);
p1.add(c3);
p1.add(l4);
p1.add(c4);
p1.add(l5);
p1.add(c5);
p1.add(l6);
p1.add(c6);
p1.add(l7);
p1.add(c7);
b1 = new JButton("INCLLUIR");
b2 = new JButton("EXCLUIR");
b3 = new JButton("CONSULTAR");
b4 = new JButton("SAIR");
b1.addActionListener(tr);
b2.addActionListener(tr);
b3.addActionListener(tr);
b4.addActionListener(tr);
b1.setForeground(Color.blue);
b2.setForeground(Color.blue);
b3.setForeground(Color.blue);
b4.setForeground(Color.black);
p2.add(b1);
p2.add(b2);
p2.add(b3);
p2.add(b4);
setLayout(new GridLayout(2, 0));
add(p1);
add(p2);
}
}
