2 Replies - 4805 Views - Last Post: 31 October 2014 - 08:00 AM

Poll: Swing or JavaFX? (2 member(s) have cast votes)

Swing or JavaFX?

  1. Swing (0 votes [0.00%])

    Percentage of vote: 0.00%

  2. JavaFX (2 votes [100.00%] - View)

    Percentage of vote: 100.00%

Vote Guests cannot vote

#1 SuperProgrammer  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 58
  • Joined: 17-April 14

Transfer to JavaFX?

Post icon  Posted 31 October 2014 - 01:59 AM

Hello guys,

I have seen that Swing is quite popular against JavaFX on DIC. I was just wondering if you Swing or JavaFX. A few months ago a transferred from Swing to JavaFX. Basically, I ditched Swing. Although it might not be popular, it has great features like CSS support and more! JavaFX even has Nodes(look it up) that are helpful in your GUI(like Calender and 3D Nodes like cameras and light).

A really big advantage over Swing is that is has a GUI builder(JavaFX Scene Builder). It stores in a file format ".FXML". Then you can add it into your code.

When I started JavaFX, it wasn't hard to learn it. In my experience JavaFX was easier to learn than Swing. I wonder what you guys think. Before you post, check out JavaFX before you regret it :P

Is This A Good Question/Topic? 1
  • +

Replies To: Transfer to JavaFX?

#2 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2386
  • View blog
  • Posts: 5,008
  • Joined: 11-December 07

Re: Transfer to JavaFX?

Posted 31 October 2014 - 06:27 AM

They are different beasts and you should consider both when choosing a GUI toolkit for your project. My experience of FX is that it is not quite as flexible as Swing. However, CSS layouts and styling sound very very nice! So does the calendar widget.

FXML leaves me cold. The only thing I can see in favour of it is when you want to change the layout without recompiling. I can't imagine why you would want to do that.

From what I have seen, laying things out is similar in both toolkits. Maybe the FX scene builder is nice. However, I have built a useful little framework that lets me lay out Swing applications very quickly in code. I bet it could be easily adapted to FX too.
Was This Post Helpful? 1
  • +
  • -

#3 SuperProgrammer  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 58
  • Joined: 17-April 14

Re: Transfer to JavaFX?

Posted 31 October 2014 - 08:00 AM

I have currently made many apps with JavaFX and they have ended up successfully. My latest ones are Desktop Screenshot Drawing Pad, Issue Form with MySQL, Issue Form Database Viewer and more wacky things. Oh yes, and my custom login with a custom window. In my experience, FXML is not bad at all. It stores all the information about the Nodes and there properties in an XML file, but it is saved in an "FXML" file. If I ever go back to Swing, I would be like "How did I ever go through Swing code?". JavaFX uses less code and it includes more useful Nodes. So it is a win-win!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1