I am a completely noob with Java. I can't figure out what is the problem with my code.
Eclipse says pythagorasComponent(TextAttribute)
is undefined for the type
object.
Can you give me a hand please?
public class Pythagoras {
public void pythagorasComponent(TextAttribute two) {
AttributedString to = new AttributedString("Your \u25b2's c2 equals
with");
super.pythagorasComponent(two);
to.addAttribute(TextAttribute.SUPERSCRIPT,
TextAttribute.SUPERSCRIPT_SUPER, 15, 16);
}
//I imported the following:
//import java.awt.font.TextAttribute;
//import java.lang.Math;
//import java.util.Scanner;
//import java.text.AttributedString;