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

  • Context: Java 
  • Thread starter Thread starter stonecoldgen
  • Start date Start date
  • Tags Tags
    Java
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
stonecoldgen
Messages
108
Reaction score
0
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?
 
on Phys.org


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