Developing a Simple Todo Application using JavaFX, Java and MongoDB- Part-1
By Mohamed Sanaulla
Over a series of 2 posts or so, I would try and show how to develop a simple Todo Desktop application using JavaFX as the Frontend, and the well known NoSQL database MongoDB as the Backend and using Java as the glue between both of them. The main aim of developing this application is to understand how we can use MongoDB and its Java driver to communicate with Java applications.
A brief about MongoDB: It is a document oriented NoSQL database, which stores the data in the form of JSON-like document structure. I can go one and write more, but we can explore as we go along.
In this post, I would cover:
- Installing MongoDB
- Trying out MongoDB using the command line.
- Downloading the Java driver for MongoDB
- Developing the backend for our application.
Developing a Simple Todo Application using JavaFX, Java and MongoDB- Part-2
In my previous post:
- I setup the objective of our sample application and named it as TodoFX (I know lot of you would have missed the naming part, lack of creativity in naming drives me create portmanteau of technology and usage of app)
- Created the back end for our sample application, in the process we played around with MongoDB (not much though).
Continuing with the application, I would like to:
- Add a few updates to the model and backend APIs we had created earlier
- Develop the UI for our application. This would include 2 parts- Developing the UI for Adding new task and Developing the UI to list all uncompleted tasks.
Developing a Simple Todo Application using JavaFX, Java and MongoDB- Part-3
By Mohamed Sanaulla
In the previous post we created the UI for adding a new Todo where in we used a Tab, TabPane and added the required controls- TextField and a Button to the Tab.
Going forward, in this post we will create the UI for listing the Open Todos i.e the Todos which have not been marked as Closed. We intend to implement the following features in the UI:
- Ability to load the Todos when the Tab is selected.
- Obtain a list view for the Todos with a scroll bar if the list takes more vertical space than required.
- For each Todo, provide a button to mark the todo as completed.
Using JavaFX Chart API to add charts to Swing applications
By Mohamed Sanaulla
In our previous post we looked at how we can embed JavaFX components into Swing applications. As Java Swing lacks Charting API, we can make use of the JavaFX Chart API and not depend on other 3rd party libraries like JFreeChart and others. The javafx.scene.chart is the package which contains all the charting related classes. In this example we will look at creating Scatter Charts and Bar Charts which are categorized as XYCharts which is nothing but these charts are plotted on a X and Y axis. The classes for the charts to be used are javafx.scene.chart.ScatterChart and javafx.scene.chart.BarChart. If you happen to look at the declaration of these classes, they accept generic types where X indicates the type on the X Axis and Y indicates the type on the Y axis. These charts require a set of axis to be defined before they are used. If the axis is of type Number, then one can use NumberAxis and for String values one can make use of CategoryAxis. For each of the Number axis or category axis we can define the range of of values to be plotted on the axis. Let me show some code on how it can be achieved:
via nasven/nasven · GitHub.
Nội dung Tạo JavaFX Application Project với Maven bằng NetBeans Các phần mềm cần thiết JDK 1.7 trở lên Maven 3.0 trở lên NetBeans 8.0 trở lên Các bước tạo project Bước 1: Vào Menu => New Project … Bước 2: Chọn Maven => JavaFX Application Bước 3: Build và Run project Tải JavaFXSimple Tại Đây
JavaFX GUI (Graphical Interface) can be created in two ways: Without Scene Builder With Scene Builder In this tutorial we are going to create a very simple application window in eclipse without scene builder. Scene Builder is a software that supports drag n drop to build application GUI.