{"id":157,"date":"2004-01-07T15:26:52","date_gmt":"2004-01-07T20:26:52","guid":{"rendered":"http:\/\/stein.everybody.org\/journal\/swing-stinks\/"},"modified":"2020-04-23T15:50:43","modified_gmt":"2020-04-23T19:50:43","slug":"swing-stinks","status":"publish","type":"post","link":"https:\/\/jeremystein.com\/journal\/swing-stinks\/","title":{"rendered":"Swing Stinks"},"content":{"rendered":"<p>I&#8217;m creating a really simple application and the differences between the Swing UI and the native Win2000 UI are painful.  Here&#8217;s a really simple example:  After clicking on a menu I decide I don&#8217;t want it to be open any more.  Normally I click on the window&#8217;s title bar to close the menu.  Try it.  Click on &#8220;Favorites&#8221; in your browser.  The menu opens.  Then click on the title bar.  In Swing, it doesn&#8217;t work.<\/p>\n<p>I&#8217;m using Java 1.4.2_03.  Windows 2000 has been around quite a while.  This ain&#8217;t no transient bug.  And that&#8217;s just one small example.  The fonts are different.  The File Chooser dialog is <a href=\"http:\/\/www.everybody.org\/~jeremystein\/blog\/img\/jfilechooser.gif\">drastically<\/a> different (for me, it resizes incorrectly, sometimes hiding buttons).<\/p>\n<p>This is the last (and first) Swing app I&#8217;ll write.  I&#8217;ll try Visual Basic (and drop to C when necessary for efficiency) next.  Or, if we have to stick with Java, maybe I&#8217;ll try <a href=\"http:\/\/www.eclipse.org\/swt\/\">SWT<\/a>.  I could create an EXE that shows a splash screen and then loads the JVM (like Eclipse does), or maybe I could even <a href=\"http:\/\/www-106.ibm.com\/developerworks\/java\/library\/j-nativegui2\/\">compile the whole thing<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m creating a really simple application and the differences between the Swing UI and the native Win2000 UI are painful. Here&#8217;s a really simple example: After clicking on a menu I decide I don&#8217;t want it to be open any more. Normally I click on the window&#8217;s title bar to close the menu. Try it. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-157","post","type-post","status-publish","format-standard","hentry","category-geek"],"_links":{"self":[{"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/posts\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/comments?post=157"}],"version-history":[{"count":1,"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/posts\/157\/revisions"}],"predecessor-version":[{"id":454,"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/posts\/157\/revisions\/454"}],"wp:attachment":[{"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/media?parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/categories?post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jeremystein.com\/journal\/wp-json\/wp\/v2\/tags?post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}