开发者

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

开发者 https://www.devze.com 2023-01-08 19:59 出处:网络
This question already has answers here: 开发者_StackOverflow中文版 Closed 12 years ago. Possible 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

精彩评论

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