How to create Scala swing wrapper classes with SuperMixin?
问题 I'm trying to understand how the following class works taken from an answer from this thread: Scala Popup Menu Since the thread is pretty old I decided to just start a new question. I'm new to Scala with a Java background and I'm wondering how this class works. I read that an object with the same name as a class is like a class with a singleton object? I'm not sure how this fits in to achieving the wrapper though.. (why do we need the object?) And what exactly does the SuperMixin trait do?