Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: thinbluernime Newsgroups: comp.lang.java.programmer Subject: Re: java swing question Date: Thu, 31 Jul 2014 16:07:28 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 106 Message-ID: References: <53cdbf92$0$291$14726298@news.sunsite.dk> <53cf0017$0$304$14726298@news.sunsite.dk> <53d9ab50$0$292$14726298@news.sunsite.dk> NNTP-Posting-Host: JxqmiciMCI1PfjzFHV291A.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:29456 On Wed, 30 Jul 2014 22:34:54 -0400, Arne Vajhøj wrote: > On 7/25/2014 12:19 AM, thinbluernime wrote: >> Welcome to the real world, where people are still depolying Java 5 in a >> lot of different places. > > [calls me a liar] No! None of the nasty things that you have said or implied about me are at all true. >>>> 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. > > [calls me a liar] No! None of the nasty things that you have said or implied about me are at all true. > Swing vs JavaFX is the topic and the argument was for exactly that. So, you're arguing that because Swing's native L&F support is not perfect, we should use a widget kit whose native L&F support is *nonexistent*? That's like arguing that because a particular SUV is a gas-guzzler you should take that road trip out west on a bicycle, rather than get a Prius. >>>> 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. > > [implied insult deleted] None of the nasty things that you have said or implied about me are at all true. Meanwhile, though I suppose if FXML can read files it could read bundle files, that doesn't get you ListResourceBundles, only PropertyResourceBundles. > ???? > > But JavaFX API comes with resource bundle support. > > That is what the second argument in the FXMLLoader constructors is for. > > You did not look much for it? I've never used FX, but if the UI content (including label text) is in FXML source rather than in the Java, it lacks direct access to (at least) ListResourceBundle. Although, I suppose one could duplicate the entire FXML source per locale, and use ResourceBundle to load a whole different FXML source for each one. Which is probably a massive pain and step backwards. Write UI code in Java, write code to localize it in Java, and you have ResourceBundle. Write UI code in language X, write code to localize it in language X, and you need something like ResourceBundle to be in language X, unless there's callback to Java (other than setting Java methods to be invoked as event handlers -- there'd need to be callback during setup as well), and then you have callback hell to contend with. >>>> 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. > > Yes. > > When I make a JavaFX application the [calls me a liar] No! None of the nasty things that you have said or implied about me are at all true. > Tested with a few combination sof Java 7 and 8 on Windows and Ubuntu. > > Obviously I don't know why it is not working for you. I never used it. It was Stefan Ram that originally made that complaint, in https://groups.google.com/forum/message/raw?msg=comp.lang.java.programmer/ IlMfy2oz2EE/fIz3iq3eveQJ . Observations: . . - The text in the text field of Swing is normal-sized here, . while the text in the text field of JavaFX is small. . . - One can use the Swing GUI without the mouse (one can write . into the text field). In order to write into the text field . in the JavaFX GUI, one first has to use the mouse and click . into the text field. The tab key has not that effect. Are you now calling Stefan Ram a liar?