Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.etla.org!aioe.org!.POSTED!not-for-mail From: thinbluernime Newsgroups: comp.lang.java.programmer Subject: Re: java swing question Date: Fri, 25 Jul 2014 04:19:34 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 61 Message-ID: References: <53cdbf92$0$291$14726298@news.sunsite.dk> <53cf0017$0$304$14726298@news.sunsite.dk> NNTP-Posting-Host: i+hccjf+IDuaX49PUP4Bpw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.10 (MacIntel) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:29297 On Tue, 22 Jul 2014 20:21:42 -0400, Arne Vajhøj wrote: > On 7/22/2014 7:58 PM, thinbluernime wrote: >> On Mon, 21 Jul 2014 21:34:10 -0400, Arne Vajhøj wrote: >> >>> But I find it very hard to see why a new GUI app should be written in >>> Swing - for that JavaFX is the obvious choice. >> >> Unless you want it to work in Java 7 without external dependencies. > > New apps should not be written for a Java version where the common > implementation goes out of support in April 2015. Welcome to the real world, where people are still depolying Java 5 in a lot of different places. >> Or you want native L&F. > > Swing's native L&F were never really true native L&F. A "no true Scotsman" argument doesn't help your case here. >> Or you want accessibility. > > It is scheduled for 8u40 according to: OK, amend that to "you want accessibility *now*". > No guarantee that it will make it. That makes my point for me. Swing has accessibility support now and it's not going anywhere. >> Or i18n via ResourceBundle. > > As far as I know then JavaFX has fine support for resource bundles. I don't see how, since I don't see how FXML could interact meaningfully with the ResourceBundle class. An external representation of the UI in some non-Java file is going to either have hardcoded label texts (no i18n) or need its own parallel, reinvented-square-wheel way of making those able to depend on locale. And Java i18n can make other things depend on locale. Icons. Field widths (because 姓名 is shorter than "Arne Vajhøj" is shorter than "Abū Kāmil, Shujāʿ ibn Aslam ibn Muḥammad Ibn Shujāʿ"). Layouts. Parameters (left-to- right vs. right-to-left). Even behavior (different ActionEvent handlers. If a particular mistake is common in a certain part of the world, can add an "are you sure?" for something that doesn't pop up in locales where most people won't need it. Scrollbar can be added for FR to a big popup message that won't all fit on typical screens at once in French, but will in Chinese. And so on.) >> Or proper keyboard focus handling. > > "proper" is rather subjective. Dialog appears, tab tab tab type enter works is proper. Dialog appears, you have to click before any keyboard input works is not proper. We can debate what the tab order should be after JavaFX has gotten the basics right. :)