[Java] what the hell am I doing wrong with this graphical interfaze?

I have a package with all the classes needed to perform the functional recquirements (calculations, etc.). It's working perfectly. The "main" class is "FinalesCopaMundo"

I have another package with all the classes needed to perform the GUI. The "main" class is "InterfazFinalesCopaMundo".

I have:

Code:
package uniandes.cupi2.finalesCopaMundo.interfaz;
import javax.swing.*;

import java.awt.*;
import uniandes.cupi2.finalesCopaMundo.mundo.*;

public class InterfazFinalesMundiales extends JFrame{

//Atributos

private PanelEquipoA panelEquipoA;
private PanelEquipoB panelEquipoB;
private PanelImagen panelImagen;
private PanelInformacion panelInformacion;
private PanelOpciones panelOpciones;

private FinalesCopaMundo finalesCopaMundo; //this line is not throwing an error

//Constructor

public InterfazFinalesMundiales(){

finalesCopaMundo=new FinalesCopaMundo(); //this line is throwing an error

I don't know why this is, any tips?

Related Programming and Computer Science News on Phys.org

OK, for some reason adding a "throws Exception" was the solution, but I don't know why, any idea?

gabbagabbahey
Homework Helper
Gold Member

Can you pst your FinalesCopaMundo class? (I assume that is where you added the throws Exception statement?)