title: Kotlin constructor with super class
body: <p>Any way I try, be it primary constructors or secondary, I can't figure out how to declare a new class with a super class and a constructor in kotlin.</p>
  
  <pre><code>class myPanel : JPanel {
      myPanel() : super() {
  
      }
  }
  </code></pre>
  
  <p>This is how i would most like t do it but it gives an error expecting member declaration.</p>
  
  <pre><code>class myPanel() : JPanel() {
      {
          ...
      }
  }
  </code></pre>
  
  <p>this is how I thought a primary constructor looked but it gives the same error. Searching the internet hasn't been helpful and all I could find was the second example.</p>
  
  <p>So, what are all of the valid ways of creating a class with a super class and its one constructor?</p>