Greetings, friends.
I have a problem with Java.
I'mtryingtoaddanelementoftype"Occurrence" in a JList. This element has 4 elements inside it, which I need to keep. So far so good.
However, the problem appears when I add that element to the list
The list shows this name in the element. Because? I would like the name of the instance to appear instead of this name.
Here is the instance code:
@Override
public void actionPerformed(ActionEvent e) {
//dispose();
Ocorrencia ocorrencia = new Ocorrencia();
ocorrencia.setLocationRelativeTo(null);
ocorrencia.setVisible(true);
ocorrenciasAtivas.modeloOcorrencias.addElement(ocorrencia);
}