Java open source charts library with animation capabilities - java

Is there any java library which is an opensource and also has the capabilities of animation .I know about JFreeChart but its charts are not that much attractive and secondly they also do not have animation feature.
Secondly i do found javafx .Kindly give me an idea is it difficult to associate javafx charts with java code? Please guide me.

Have a look at Charting and Reporting # java-source.net and 15 useful Java Java Charting and Reporting Tools.

It is simple to associate JavaFX charts with Java Code. For example, the following Java code will create a JavaFX PieChart:
final PieChart chart = new PieChart(FXCollections.observableArrayList(
new PieChart.Data("Oranges", 25),
new PieChart.Data("Pears", 22),
new PieChart.Data("Apples", 30)
));
If you use the JavaFX charts, make sure you are using the newest JavaFX 2 code base (where the JavaFX code is written in Java) rather than the older JavaFX 1.3 code base (where the JavaFX code is written in a specialized script language).
JavaFX has a charting API and an animation API, but not a specific API for animating charts. You can perform animation on chart elements using JavaFX, but you need to either write the API and code to perform the animation on the charts yourself or base your chart on JavaFX Ensemble sample (which is not a full animation API for charts).
To help determine whether JavaFX charting is a good match for your application, review the JavaFX Samples. The Ensemble sample application has examples for both static and animated charts. The SwingInterOp sample application has an example of embedding a JavaFX graph inside a traditional Java Swing application. There is good documentation on JavaFX charting.
Note that JavaFX (as of 2.0.2) does not currently have a printing API, in case printed charts is also a consideration, though you could leverage the printing capabilities of Swing if needed.

Related

Embed google maps in Java desktop Application

I want to embed google maps on a JPanel. Since I want features like zoom-in/out, using static images isn't feasible.
To achieve this, I'll probably need to embed a webpage (which displays google maps) in my Java desktop application. And I've read that I'll need something like WebKit (alternatives?) to accomplish this.
I'd appreciate any help that'll help me:
Embed a webpage in a Jpanel.
That webpage to display google maps.
Yes, the Google Maps APIs can now be used in Desktop applications
Check out these Stack Overflow threads:
Google Map in JAVA Swing
Embedding Gecko/Webkit in Java
Webkit browser in a Java app
Rendering webpages with WebKit in Java
You can also see the tutorail of using Maps in Java Desktop Application.
You can use JxMaps library to complete this task. It has Swing component which can be simply embedded to JPanel.
void createMapView(JPanel parent) {
MapView view = new MapView();
parent.add(view);
}
This library has comprehensive set of classes for working with Google Maps from java.

java fx editor in netbeans

I want to make an animation using Java FX.
Basically, I don't know where to start. I've been looking for a Java FX editor and I found out that there is an editor apart from netbeans. But that editor, now is integrated to netbeans (after netbeans 7.x.x) and I can't find the way of making a Java FX animation using the modern version of netbeans.
And, can I make an animated frame, just one? So that the rest of the frames keep the same as they were before (non-animated) ? Or do I need to start a whole new animated project and do all the coding in Java FX?
Thanks
Java FX is not just an animation, presentation or game building tool like Flash, but a great UI framework with the power and flexibility of Java.
It is a relatively new technology that there is no Flash like tool to do complex drawings and animations, AFAIK.
I guess you mentioned about Scene Builder as the NetBeans integrated editor in your question. Scene Builder lets you build UI through drag & drop just like the NetBeans Swing GUI Builder or Visual Studio. It uses a special XML based markup language called FXML to write the UI.
Unfortunately, It runs a lot slower than it should, even on a 3 GHz Intel Pentium 4 CPU.
IMHO, the best option is to programatically code your UI in Java FX.
Resources
Official Java FX 2 Getting Started Tutorial
JavaFX 2 Scene Builder Tutorial
Another Java FX Getting Started Tutorial

Making label creators in Java

I want to create a tool in java that can be used to create labels for consumer products. This is similar to CD label creators. What are the techniques available for doing this and guide me in a good direction so that i can walk through perfectly. If you just give me some tips i will start coding on it.
Here are some tutorials that should get you started, using AWT Print and Graphics2D:
Swing Tutorial - High-Quality Java Printing
Printing - Java Tutorials by Sun/Oracle
Using the 2D graphics API means you'll be able to render the result on-screen as well as print it. This will be significantly easier if you already know something about AWT or Swing.

Are there any specific requirements for a Swing component to be run in JavaFX environment?

My company have a web application product for distribution planning and scheduling. An important part of it is a gantt chart component where user can fine tune the schedules. Currently the gantt chart component is pure javascript+dhtml.
I am currently looking into the possibility of moving to JavaFX to get richer interactivity and generally nicer UI.
We found this (100%) Swing component called FlexGantt (http://www.dlsc.com/Java_Gantt_Chart_for_Swing.html) and curious to know whether there are any specific requirements for a Swing component to be run in JavaFX environment before we actually spend time to learn JavaFX.
Thanks.
According to this link there shouldn't be any problems:
http://javafx.com/samples/ExercisingSwing/index.html
--Dirk
www.dlsc.com :-)

Plot Graphs in Java

The Java Swing GUI that I'm developing needs to plot a 2D graph based on the x and y coordinates generated in the program.
Is there a Swing component for that?
Or is there any other open source package for the purpose?
You should check out JFreeChart which has Swing support. Here are some samples:
http://www.jfree.org/jfreechart/samples.html
You should look at JFreeChart.
check out the feature comparison for Java report and charting libraries; http://java-source.net/open-source/charting-and-reporting
Here is a related answer of me: I have summary of existing tools and show a alternative option to create interactive charts with Gnuplot in a JPanel
Java 3D plot library?
For your case (2d charts) JFreeChart is OK. But sometimes JFreeChart is overkill for simple charts.

Categories