Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

TextComponent  RSS feed

 
Keith Lockey
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand how a public class like TextComponent (that is not abstract and not an interface) is not instantiable?
Don't understand the purpose of this as well??
Thanks,
Keith
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It has no public constructors. If you can't call a class's constructors, then you can't instantiate it. Only subclasses (like TextArea) in the same package can extend it and provide a public constructor.
I don't know why this class isn't abstract; it certainly seems that it should be.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!