开发者

Multiple Constructors in Scala should call different super methods [duplicate]

This question already has answers here: 开发者_StackOverflow中文版 Closed 12 years ago.

Possible Duplicate:

In Scala, how can I subclass a Java class with multiple constructors?

Hello all clever people

I'm currently having a little problem where I need to invoke different super methods based on which constructor I invoke. In short it is something like this:

class HelpfulJList(model: ListModel) extends JList(model) with MouseListener {

    def this() = { //Call super wihtout arguments -> JList()}
}

How can this problem be solved? Thanks in advance. Regards Stefan.


Similar / related question: In Scala, how can I subclass a Java class with multiple constructors?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜