So this is my 3rd post for this project, hopefully the last. So when my program does on the math in the other classes, it needs to come out to a JLabel. the problem is, it doesn't show up. Maby one of you could help me? Sorry the code will be f'ed up when I post it, I cant fix it.
import java.awt.Color;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class AFA {
public void answer() {
System.out.println("1");
int area = (int) (AF.length * AF.width);
String an = String.valueOf(area);
JFrame answer = new JFrame();
answer.setBackground(Color.yellow);
JPanel pan2 = new JPanel();
JLabel a = new JLabel("The answer is " + an + "We got this by multiplying the Lenght by the width");
pan2.add(a);
System.out.println("1");
answer.setVisible(true);
}
}