Tag Archives: JavaFX

JavaFX KeyCodeCombinations in Clojure

I’ve been experimenting with adding keyboard accelerators to some of the Clojure programs I’ve written with JavaFX-based user interfaces. As part of that investigation, I tried to translate the Java program here to Clojure. The program just puts up a window with a menu bar containing only a “File” menu which itself contains one item, “Exit“. Most programs provide a keyboard shortcut or accelerator to close the program with a Ctrl-X (on Windows). Figuring out how to add that functionality was a bit of an issue for me.

Continue reading

Clojure, JavaFX and Tic-Tac-Toe

Recently, I have been experimenting with JavaFX in Clojure. Initially, in one of my experiments, I wanted to learn how to re-size a game-board interface as it’s containing window was re-sized. In the past I’ve had medical device interfaces that draw a representation of a physical device and these drawings must re-size as their window is re-sized. The initial experiment was with a simple interface for Tic-Tac-Toe. Since I had such a nice interface, I thought, why not program the complete game.

Continue reading

Styled Dialogs in JavaFX with JFXtras MonologFX

I’ve been having a lot of fun learning JavaFX, even after many years of using the Java Swing framework.

One thing about JavaFX that I still don’t understand is the lack of built-in support for dialogs. Well, that shortcoming has annoyed enough people that there are several efforts underway to provide dialog functionality. One of those is part of the JFXtras project, MonologFX.

Continue reading

Re-sizing an Interface in JavaFX and Clojure

Since JavaFX is the future of the user interface for Java, I’ve started trying to learn it. Since I’m also learning Clojure, I’m doing the work in that language.

One of the things I’ve been looking into is how the interface responds to resizing. If you have all of your controls in a nice layout, that is usually taken care of for you. But how do you handle things if the interface is not made up of standard components, something like a graphical game interface for example?

Continue reading