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


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

Re: java swing question

Date 2014-08-02 23:03 -0400
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: java swing question
References (6 earlier) <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>
Message-ID <53dda66b$0$298$14726298@news.sunsite.dk> (permalink)
Organization SunSITE.dk - Supporting Open source

Show all headers | View raw


On 7/31/2014 12:07 PM, thinbluernime wrote:
> On Wed, 30 Jul 2014 22:34:54 -0400, Arne Vajhøj wrote:
>> On 7/25/2014 12:19 AM, thinbluernime wrote:
>> 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*?

Yes.

Looking different may be better than looking fake.

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

Not comparable.

>>>>> 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.
 >>
 >>????
 >>
 >> But JavaFX API comes with resource bundle support.
 >>
 >> That is what the second argument in the FXMLLoader constructors is for.
> 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.

That is very basic OO.

>> You did not look much for it?
>
> I've never used FX,

May I suggest that you actually try things before commenting
on them so you have just a basic understanding about what
you are talking about.

>                  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, but that is not relevant. The code with a resource bundle process
the FXML. Which you would know if you actually worked with the
technology. Or if you just were able to guess what a FXMLLoader actually
may do.

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

>>>>> 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 I just tab and type - no need
>> to click.
 >>
>> 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 that originally made that complaint, in
> <JavaFX-20140713164157@ram.dialup.fu-berlin.de>
>
> https://groups.google.com/forum/message/raw?msg=comp.lang.java.programmer/
> IlMfy2oz2EE/fIz3iq3eveQJ
>
> . Observations:

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

I don't think Stefan made the claim that JavaFX had a general
problem. He had a problem with a specific JavaFX program and
in his next post he said that he had another JavaFX program
which did not have the problem.

Arne


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