o**d 发帖数: 11 | 1 OK. Since it is a ABSTRACT class, it is not possible to
instantiate it. What you need to do is to create a a
subclass to FontMetrics, which implements all the abstract
methods in FontMetrics. Then you could write code like:
FontMetrics myMetrics = new FontMetricsSubClass(newfont);
If you have an abstract method in FontMetrics, say
myMethod(). When you call myMentrics.myMethod(), it will
find the real object it points to and run the implementation
in FontMetricsSubClass. It is called dynamic bind |
|