title: Scala can't import a class that Java can
body: <p>Why I can do this in Java:</p>
  
  <pre class="lang-java prettyprint-override"><code>import javax.swing.GroupLayout.Group;
  </code></pre>
  
  <p>but if I do the same in Scala (by using Ammonite), I get this:</p>
  
  <blockquote>
    <p>value Group is not a member of object javax.swing.GroupLayout possible
    cause: maybe a semicolon is missing before `value Group'? import
    javax.swing.GroupLayout.Group</p>
  </blockquote>
  
  <p>Is it due to the fact that <code>Group</code> is a public class derived from a private class called <code>Spring</code>?.</p>
  
  <p>I can import neither <code>SequentialGroup</code> nor <code>ParallelGroup</code>.</p>
  
  <p>Is it a bug in Scala?
  I'm using Java 11 and Scala 2.12.10.</p>
  
  <p>Scala 2.13.1 also fails.  :-(</p>
  
  <p>I need the import, for defining a generic method that can have a <code>Group</code> parameter, that could be either a <code>ParallelGroup</code> or a <code>SequentialGroup</code>.</p>