I'm trying to make the table list load and not loading always gives this error
Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem:
The constructor PanelListClientes() is undefined
at view.FramePrincipal.listClientClicked(FramePrincipal.java:118)
at view.FramePrincipal$6.actionPerformed(FramePrincipal.java:94)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
My View Code is this
public class PanelListClientes extends JPanel {
private JTable table;
/**
* Create the panel.
*/
public PanelListClientes(TableCliente tablecliente) {
setLayout(null);
JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(10, 181, 430, 108);
add(scrollPane);
table = new JTable();
table.setModel(tablecliente);
scrollPane.setViewportView(table);
JButton btnCarregarTabela = new JButton("Carregar Tabela");
btnCarregarTabela.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
CarregarClicked(e);
}
});
btnCarregarTabela.setBounds(267, 135, 142, 23);
add(btnCarregarTabela);
}
protected void CarregarClicked(ActionEvent e) {
ControleCliente cCliente = new ControleCliente();
cCliente.constroiTabela();
}
The method that gives error is that of the main menu
protected void listClientClicked(ActionEvent e) {
PanelListClientes plClientes = new PanelListClientes();
this.setContentPane(plClientes);
}