Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29533

Re: java swing question

Path csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From thinbluernime <thinbluernime3@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: java swing question
Date Sun, 3 Aug 2014 19:25:20 +0000 (UTC)
Organization Aioe.org NNTP Server
Lines 117
Message-ID <lrm2b0$9e9$1@speranza.aioe.org> (permalink)
References <lqh4gr$8ph$1@speranza.aioe.org> <lqh4ul$9ve$1@speranza.aioe.org> <paint-20140720213805@ram.dialup.fu-berlin.de> <k7bps9piodba7gbvt045j9or76nobk6989@4ax.com> <lqivm7$snv$1@dont-email.me> <53cdbf92$0$291$14726298@news.sunsite.dk> <lqmtqs$qke$1@speranza.aioe.org> <53cf0017$0$304$14726298@news.sunsite.dk> <lqslsm$5kq$1@speranza.aioe.org> <53d9ab50$0$292$14726298@news.sunsite.dk> <lrdpk0$df3$1@speranza.aioe.org> <53dda66b$0$298$14726298@news.sunsite.dk>
NNTP-Posting-Host PGOUyzC1g6V7OsTESYUkvA.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:29533

Show key headers only | View raw


On Sat, 02 Aug 2014 23:03:07 -0400, Arne Vajhøj wrote:

>> 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*?
> 
> Yes.

You're insane.

>> 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.
> 
> [calls me a liar]

No! 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.
> 
> ????
> 
> FXMLLoader takes a ResourceBundle as argument. And since both
> PropertyResourceBundle and ListResourceBundle extend that, then it works
> with both.

You're talking about some Java class. I'm talking about the FXML itself. 
In which your shiny new user interface resides. And which contains button 
labels and things like that that need to be localized. And where it would 
be preferable if you could potentially localize a lot more than just some 
snippets of text. How do you propose for that to access a ResourceBundle? 
At best it likely would go through some clunky interface to call Java 
from FXML, the way you have to to call C from Java with JNI, and it would 
be a similarly fruitful source of bugs and platform differences.

> That is very basic OO.

Funny you should say that, since the ML family of languages are not OO, 
but functional.

>>> You did not look much for it?
>>
>> I've never used FX,
> 
> May I suggest that [implied insult deleted]

No, you may not. None of the nasty things that you have said or implied 
about me are at all true.

>>                  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.
> 
> Yes

Well, there you go, then.

>> 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.
> 
> You have never worked with templates before????
> 
> You can certainly replace things in a template without having the
> template make callbacks to your code.

We are not talking about templates. We are talking about a whole other 
programming language. You can certainly not replace things in code 
without breaking things. What would happen if Java ran from a C boot-
loader than rewrote parts of your Java? What happens now if you blindly 
run a search and replace over Java code? You seem to be suggesting that 
label text is searched and replaced with localizable strings at some 
step. But picture what would happen if you wrote a chunk of software for 
use by, say, teachers, and in that there was a button with the text 
"class", and then whenever it was run the source code for the program was 
subjected to a search and replace for "class", among other things, to put 
in a localized version, before it was compiled and run? And then some 
school in a San Diego neighborhood with a lot of Hispanic students and 
staff goes to use it and the compiler complains about "public clase 
GradeAverage"? Because this is what you're suggesting the FXML gets 
subjected to. What happens when a label text collides with a language 
keyword, identifier, or other non-string-literal part of the FXML, and 
your search and replace gets carried out?

>>> Yes.
>>>
>>> When I make a JavaFX application the
> [misquotes me]

Do not misquote me again. Your post contained supposed "quoted material" 
that did not occur in the post that you followed up to. That is 
incorrect. Stop being dishonest.

>>> 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.
> 
> Then maybe it was a bad idea to make the claim.

It was Stefan Ram who made the claim.

>> Are you now calling Stefan Ram a liar?
> 
> [yes]

Then that's a dispute between you and Stefan Ram. Please leave me out of 
it.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

java swing question Peter <mcheung63@gmail.com> - 2014-07-21 03:15 +0800
  Re: java swing question Peter <mcheung63@gmail.com> - 2014-07-21 03:23 +0800
    Re: java swing question Jeff Higgins <jeff@invalid.invalid> - 2014-07-20 15:24 -0400
      Re: java swing question Peter <mcheung63@hotmail.com> - 2014-07-21 18:34 +0800
      Re: java swing question lipska the kat <lipskathekat@example.com> - 2014-07-21 15:56 +0100
      Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-21 21:49 -0400
        Re: java swing question Jeff Higgins <jeff@invalid.invalid> - 2014-07-22 17:35 -0400
          Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-30 22:38 -0400
      Re: java swing question Luft <edamron@spamcop.net> - 2014-08-05 12:29 -0700
        Re: java swing question Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-08-05 15:50 -0400
          Re: java swing question Joerg Meier <joergmmeier@arcor.de> - 2014-08-05 23:33 +0200
        Re: java swing question Jeff Higgins <jeff@invalid.invalid> - 2014-08-05 18:41 -0400
    Re: java swing question Roedy Green <see_website@mindprod.com.invalid> - 2014-07-20 23:04 -0700
      Re: java swing question Daniele Futtorovic <da.futt.news@laposte.net> - 2014-07-21 14:05 +0200
        Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-21 21:34 -0400
          Re: java swing question Daniele Futtorovic <da.futt.news@laposte.net> - 2014-07-22 20:50 +0200
          Re: java swing question thinbluernime <thinbluernime3@gmail.com> - 2014-07-22 23:58 +0000
            Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-22 20:21 -0400
              Re: java swing question thinbluernime <thinbluernime3@gmail.com> - 2014-07-25 04:19 +0000
                Re: java swing question Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2014-07-25 00:15 -0500
                Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-30 22:34 -0400
                Re: java swing question thinbluernime <thinbluernime3@gmail.com> - 2014-07-31 16:07 +0000
                Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-08-02 23:03 -0400
                Re: java swing question Joerg Meier <joergmmeier@arcor.de> - 2014-08-03 12:17 +0200
                Re: java swing question thinbluernime <thinbluernime3@gmail.com> - 2014-08-03 19:25 +0000
      Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-21 21:31 -0400
        Re: java swing question Wayne <nospam@all.invalid> - 2014-07-22 00:32 -0400
          Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-22 19:50 -0400
        Re: java swing question "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-07-22 14:04 +0100
          Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-22 21:58 -0400
            Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-22 22:00 -0400
      Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-21 21:35 -0400
    Re: java swing question Peter <mcheung63@hotmail.com> - 2014-07-21 18:33 +0800
    Re: java swing question Jeff Higgins <jeff@invalid.invalid> - 2014-07-21 17:13 -0400
      Re: java swing question Jeff Higgins <jeff@invalid.invalid> - 2014-07-21 17:40 -0400
      Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-21 21:46 -0400
        Re: java swing question Joerg Meier <joergmmeier@arcor.de> - 2014-07-28 23:47 +0200
          Re: java swing question Josip Almasi <joe@vrspace.org> - 2014-07-29 00:17 +0200
          Re: java swing question Arne Vajhøj <arne@vajhoej.dk> - 2014-07-30 21:09 -0400
    Re: java swing question Silvio <silvio@internet.com> - 2014-07-22 02:18 +0200

csiph-web