Hello World!
I would like to share my learning journey with JavaFX, this is my notepad project.
Before starting
Java Version: openjdk 22
IDE: IntelliJ Community Edition
Build Tool: Maven
My Plan
If you look at Notepad you can break it down into a few parts. Menu, TextArea, Icon, Title, Control (Close…).
Time to code
I create with IntelliJ a new JavaFX Project and start with a mvc architecture.
MainView
The MainView gives me my root element for the Scene, this is where the text area and the menu are added.
Menu
Next we create the menu. I have created helper functions for the individual menu areas.
Model
Than we must implement some logic, to make the Menu clickable, editable the text …
You can play around here and add all the features you want.
Controller
My controller only connects the view to the models.
Conclusion
Thank you for reading this far! I’m still new to writing articles and have a lot to learn. I appreciate for your feedback.
Happy coding
暂无评论内容