16

Star Chess 2.1 for Swing Released

 3 years ago
source link: https://news.kynosarges.org/2020/04/20/star-chess-2-1-for-swing-released/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Star Chess 2.1 for Swing Released

Version 2.1.0 of Star Chess, my free mini space conquest game built to demonstrate a multiplayer turn prediction algorithm, is now available for download. As with previous updates to MIME Browser and Tektosyne, the big change is again due to the removal of JavaFX from Oracle’s Java SE distributions: Star Chess is now based on Java AWT/Swing rather than JavaFX.

The minimum Java requirement was consequently lowered to Java SE 8, although note that you still need Java SE 9 or later to get high DPI scaling. See the updated ReadMe and WhatsNew files for details. By and large I could recreate the entire GUI functionality, with the following exceptions:

  • Changing the font of an entire Swing GUI is cumbersome, so the futuristic Share Regular font is now only used in the map view and data view. Menus, dialogs, and status bar use the default font for the selected Swing Look & Feel.
  • Speaking of which, the default is Nimbus but I added a command-line switch to selected a different L&F. Note that the only other tested L&F is Metal. I had to hard-code some magic numbers to fix up the Swing layout, so other L&Fs might not work correctly.
  • The map view cursor used to be animated, but I found that impossible to recreate in Swing so now it’s static. Sorry.
  • The online help is slightly less pretty now, but overall the move from JavaFX WebView to Swing JEditorPane with HTMLEditorKit worked well. Tip for coders: this combo does support UTF-8 but not automatically. You have to explicitly call setContentType("text/html;charset=UTF-8") on the JEditorPane.
  • On the upside, hovering the mouse cursor over menu items now shows tool tips, as with buttons and data view symbols. Moreover, you can select one or more commands in the command list and copy them to the clipboard in the chess-like notation used for save files.

a11046dab0d098ea1f638a89e2253dc7?s=49&d=retro&r=pgAuthor Christoph NahrPosted on 20 April 2020Categories ProjectsTags Java Swing


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK