I have created a class that calculates the area of a regular polygon, and the calculation is done and then everything is passed to a method which is supposed to show the result inside a text-field but it does not, here is the method:
public void ShowResults(T perimeterof, T areaof) {
perimeter.setText(String.valueOf(perimeterof));
System.out.println(perimeetrof);
System.out.println(areaof);
area.setText(String.valueOf(areaof));
}
okay, I know the values of perimeterof and areaof are correct since systemoutprint does print the correct results, now, perimeter and area are 2 fields inside a jpane and they do exist, even if I update the names of the fields the name is also updated in the method, perimeterof and areaof are double type, I really have no idea why it is not updating the values of the fields, can someone see anything wrong with the above code?