Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.tele2net.at!news.panservice.it!feed.xsnews.nl!border02.ams.xsnews.nl!feeder04.ams.xsnews.nl!feeder03.ams.xsnews.nl!frontend-F09-15.ams.news.kpn.nl From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: Could this be done better Organization: Decebal Computing References: <87zjbg97c5.fsf@Equus.decebal.nl> X-Face: "(y8cC@tg_12{">GF'UXTW]FHI2wMiZNrnf'1EFQ&O#$m:f#O7+7}kR,v+Pti8=Vi/Z"g^?b"E X-Homepage: http://www.decebal.nl/ Date: Mon, 24 Nov 2014 17:54:31 +0100 Message-ID: <87lhn08rp4.fsf@Equus.decebal.nl> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:4S3/KUc8PaMCRrSkBYUIgh0eP3o= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 45 NNTP-Posting-Host: 77.171.42.144 X-Trace: 1416848336 news.kpn.nl 21177 77.171.42.144@kpn/77.171.42.144:52363 Xref: csiph.com comp.lang.java.programmer:30393 Op Monday 24 Nov 2014 12:49 CET schreef Qu0ll: > "Cecil Westerhof" wrote in message > news:87zjbg97c5.fsf@Equus.decebal.nl... > >> I have mostly programmed back-ends. But I now want also to do some >> front-end programming. >> >> I wrote the following simple program. It does nothing useful, it >> just displays a description in different colours with the colour >> appended to the description. >> >> I was just wondering if this could be done better. > > Yes - use JavaFX instead of Swing. > > JavaFX is the *official* GUI toolkit for use with Java applications > as stated by Oracle themselves. Swing is deprecated (though not in > the pure Java sense) in that it is not getting any love (updates, > bug fixes, new features) and never will. > > Java developers should only use Swing if they have to modify an > existing application or write a new one that works with existing > frameworks that happen to be Swing-based. > > Otherwise, use JavaFX. Don't look back. Well there where several reasons to use Swing, but most seem not valid anymore. - I work mostly with Linux. JavaFX was not supported there, but it looks like that is solved. - I also work with Clojure. The ‘only’ GUI to use was Swing, but it seems that JavaFX should be doable also. - It also looks like JavaFX is supported on Android. - But this one is still valid I am afraid. At a lot of projects they expect you to have Swing experience. JavaFX rarely as far as I have seen. So I think it is good to start with Swing, but not forget about JavaFX. By the way: is JavaFX thread safe? Swing is not I found out. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof