In this blog post we will look at two ways to load the Scheduling library for Java Swing from Maven using Apache NetBeans IDE. In our previous blog post we looked at how to add the library from a local *.jar file. Now we will load it interactively from Maven. MindFusion’s repositories on Maven can be found at https://search.maven.org/search?q=mindfusion.
In the sections below we will look on how to load the Scheduling library from Maven and use it in a:
- Maven project
- Gradle project
We test that the scheduling library was successfully loaded by showing a simple calendar:
I. Using JScheduler in a Maven Project
We click File -> New Project and in the wizard we choose “Java with Maven” from the Categories and “Java Application” from the Projects list.
We give our project a name. Once it appears in the Projects tree, right click on the “dependencies” node and choose “Add Dependency”:
Search for “mindfusion” in the dialog that appears. Once you’ve locates the library you want to add, click on it and check if it appears as a pom file. If so, delete the text in the “Type” field and leave it empty.
If everything is done correctly, you should be able to see the scheduling library listed under the dependencies node:
Now you should be able to import the packages of the calendar and use it in your project. You can download the sample project from here:
Scheduling for Java Swing in a Maven Project: Download Source
II. Using JScheduler with a Gradle Project
Choose File -> New Project -> Java with Gradle from the Categories and “Java Application” from the suggested projects. Give your project a name:
Once your project initializes open the build script, which is located in the Build Scripts folder of the “***:app” tree node in your project. Locate the ‘dependencies’ code and add the following line:
The syntax of the code that loads the scheduling library from Maven follows the convention:
The syntax is the same for any Maven library and you can edit it to load MindFusion diagramming and charting libraries for Java Swing. If you’ve declared correctly the import, you should be able to access the scheduling packages in your gradle project classes.
Scheduling for Java Swing in a Gradle Project: Download Source
If you need help using the Java Scheduler with NetBeans, please contact our support team at email@example.com or write at the support forum.
About MindFusion Scheduling for Java Swing: The library provides extensive feature-set for creating and customizing all sorts of calendars, task lists, time-management tables, resource allocation tables and other. It boasts various options for customizing appearance and numerous events for handling user actions. The distribution archive includes a lot of samples and detailed documentation. Learn more at https://mindfusion.eu/java-scheduler.html