Add Spring to JavaFX

Yesterday I wanted to add Spring to my Pandoc project and I had a lot of trouble with it. My problem was that I wanted to split my FXML files into multiple files and make each file controlled by a separate controller. This is – without Spring – not a real problem, because you just create your controller classes, add fx:controller=”YourController” to each FXML file and everything’s fine. But problems arise if you now want to have some objects to be autowired by Spring. I read a lot of tutorials about the topic, but every tutorial just showed the problem if you have only one main controller for your root FXML file. By the way this and this are nice tutorials to get in touch with the problem.

Continue reading

First steps with JavaFX

Today I want to write about my first steps with JavaFX and try to go through my first application step by step. I only provide some examples and in this case it’s not a copy-and-run example! You must read the documentation which is mentioned below. In order to see the full code of the application, browse the sources in my GitHub project: https://github.com/seeebiii/PandocGUI

This week I had a small problem: I had to convert some wiki pages from a GitHub project from markdown format to another format like *.docx. So, I remembered a friend told me a few weeks ago about Pandoc which can convert a lot of documentation formats to a lot more of documentation formats. I gave it a try: searched for “Pandoc download” and found an installer for Windows. Unfortunately I’m a person who prefers GUIs, thus I was a little bit disappointed as I realized that I had to use the console for conversion. But after converting I was fascinated that it worked pretty well and fast, I only had to do a few changes, because if you want to convert multiple input files, Pandoc merges all input files together to one file. A few hours later I decided to create a GUI and started a JavaFX project.

Continue reading