Learning Java and JavaFX: A Journal Application
In my effort to showcase what I have learned so far with Java and JavaFX, I wrote a journal application called Journaler.
- A single-column table view for listing all journal entries.
- A text field for entering and displaying for the current entry
- A text view for the body of the journal entry
- Buttons and menu items (and keyboard shortcuts) to create, delete, or add/update entries.
- Menu items (and keyboard shortcuts) to save entries to disk, open entries file from disk, and closing the application.
The functionality to create an entry, or delete or add/update a current entry can be invoked via menu items, keyboard shortcuts or buttons in the main window.
When the user wants to add or update an entry, it is first checked by the application to ensure that the title and body are not empty. The valid entry is then added to the entries list in the table view. The entries are saved to disk used Java’s built-in object serialization to encode the objects for later usage, and written to a file with the extension *.jents. The next time the application is started, the user can use the open file dialog (Cmd+O from keyboard, or from the File menu) and select the previously saved Journaler file with the extension *.jents.
Hardware: Late-2016 Macbook Pro w/ Touchbar
OS: macOS 10.13
JavaFX: API 8.0.141, Runtime 8.0.92
IDE: Netbeans 8.2
GUI Builder: Scene Builder 8.4.0