title: Swing Issue on Java 10
body: <p>I am currently trying to move our application from Java 8 to Java 10 and in few months will be moving to Java 11.</p>
  
  <p>We have a legacy system which uses a bit of API's which are removed or will be removed I guess. We are using ant script (1.10.1) for our application compilation.</p>
  
  <p>Below is the same of the part that build our application:</p>
  
  <pre><code>  &lt;target name="javac-setup" depends="flags, with.clover, jaxb-apply, flamingo.javac"/&gt;
  
      &lt;target name="javac" depends="javac-setup"&gt;
          &lt;mkdir dir="${workmanager.dir.classes}"/&gt;
          &lt;javac destdir="${workmanager.dir.classes}" deprecation="on" debug="${javac.debug}" encoding="iso-8859-1" includeantruntime="false"&gt;
              &lt;compilerarg line="-Xlint:static"/&gt;
              &lt;compilerarg line="-Xlint:unchecked"/&gt;
              &lt;compilerarg line="-Xlint:overrides"/&gt;
              &lt;compilerarg line="-Xmaxerrs 9999" /&gt;
              &lt;compilerarg line="-Xmaxwarns 9999" /&gt;
              &lt;compilerarg value="-Werror"/&gt;
              &lt;src path="${workmanager.dir.src}"/&gt;
              &lt;src path="${webservices.dir.java.src}"/&gt;
              &lt;patternset refid="java.sources"/&gt;
              &lt;classpath refid="classes.classpath"/&gt;
          &lt;/javac&gt;
      &lt;/target&gt;
  </code></pre>
  
  <p>During compilation I am getting few errors related to Java Swing (again bit older one, but have to live with it) after moving to Java 10. As I am still not completely aware of all the changes happened in Java 10, to me it looks like the issue is related to modularization concept. Not sure though still learning. I know your suggestion to know if these kinds of error are related to modularization. Also any suggestion or tips to fix these?</p>
  
  <p>Below is the error:</p>
  
  <pre><code>[javac] Compiling 3253 source files to C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\classes
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\datamgmt\report\ui\AssignPosNumberToolbar.java:26: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsButtonUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\datamgmt\report\ui\AssignPosNumberToolbar.java:27: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsToolBarUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\utils\WMClosableTabbedPane.java:33: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\MultiColumnComboBox.java:58: error: package com.sun.java.swing.plaf.motif is not visible
      [javac] import com.sun.java.swing.plaf.motif.MotifComboBoxUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.motif is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\datamgmt\ui\SimplificationComboBox.java:31: error: package com.sun.java.swing.plaf.motif is not visible
      [javac] import com.sun.java.swing.plaf.motif.MotifComboBoxUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.motif is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\xplookandfeel\XPComboBoxUI.java:21: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsComboBoxUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\datamgmt\ui\favorites\FavoritesToolBar.java:28: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsButtonUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\datamgmt\ui\favorites\FavoritesToolBar.java:29: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsToolBarUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\ptc\PtcLaf.java:14: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\ptc\PtcMenuUI.java:31: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\ptc\PtcRadioButtonMenuItemUI.java:14: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsIconFactory;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\ptc\PtcSeparatorUI.java:20: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsSeparatorUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\xplookandfeel\XPButtonUI.java:26: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsButtonUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\xplookandfeel\XPLookAndFeel.java:24: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsIconFactory;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\xplookandfeel\XPLookAndFeel.java:25: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\xplookandfeel\XPMenuUI.java:25: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\xplookandfeel\XPRadioButtonMenuItemUI.java:14: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsIconFactory;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\xplookandfeel\XPSeparatorUI.java:17: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsSeparatorUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\xplookandfeel\XPToggleButtonUI.java:23: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsToggleButtonUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] C:\WorkSpace\JAVA10\oswm\rel20.10_Patches\WorkManager\src\com\osm\ui\laf\xplookandfeel\XPToolBarUI.java:17: error: package com.sun.java.swing.plaf.windows is not visible
      [javac] import com.sun.java.swing.plaf.windows.WindowsToolBarUI;
      [javac]                               ^
      [javac]   (package com.sun.java.swing.plaf.windows is declared in module java.desktop, which does not export it)
      [javac] 20 errors 
  </code></pre>