Avinash
JAVA image zoom in/out
2 Answer(s)      4 years and 8 months ago
Posted in : Framework
how to write function in java for image zoom in and zoom out using jFreeChart?
Advertisement
View Answers

September 23, 2010 at 5:41 PM


Hi Friend,

Try the following code:

import java.awt.* ;
import org.jfree.ui.*;
import org.jfree.data.*;
import org.jfree.chart.*;
import org.jfree.data.xy.*;
import org.jfree.chart.plot.*;
public class Chart extends ApplicationFrame {
private ChartPanel chartPanel;
public Chart(String title) {
super(title);
XYSeries series = new XYSeries("Marks");
series.add(1, 80);
series.add(2, 75);
series.add(3, 70);
series.add(4, 90);
XYDataset xyDataset = new XYSeriesCollection(series);
JFreeChart chart = ChartFactory.createXYLineChart
("XYLine Chart using JFreeChart", "ID", "Marks",
xyDataset, PlotOrientation.VERTICAL, true, true, false);

chartPanel = new ChartPanel(chart);
chartPanel.setHorizontalAxisTrace(true);
chartPanel.setVerticalAxisTrace(true);
chartPanel.setPreferredSize(new java.awt.Dimension(400, 270));
setContentPane(chartPanel);
}

public static void main(String [] args) {
Chart demo = new Chart("Mouse Zoom Demo");
demo.pack();
RefineryUtilities.centerFrameOnScreen(demo);
demo.setVisible(true);

}
}

Hope that it will be helpful for you.
Thanks


October 1, 2011 at 6:14 PM


hi...........

but i am getting error in import file.?//////

can u tell me the reason???????










Related Tutorials/Questions & Answers:
JAVA image zoom in/out - Framework
JAVA image zoom in/out  how to write function in java for image zoom in and zoom out using jFreeChart?  Hi Friend, Try the following... static void main(String [] args) { Chart demo = new Chart("Mouse Zoom
Java Swing code for zoom in and out
Java Swing code for zoom in and out  hi.......... I require a code in java swing for image zoom in and zoom out can u tell me how it can be done or what is the code plz help
Advertisements
JavaScript Zoom in and Zoom out
illustrates you how to zoom in and zoom out of an image using JavaScript. Here we... and width of the image and make it to show the effect Zoom In and Zoom Out... the image zoom in and zoom out. As long as you put the cursor on the link Zoom
UIWebView Zoom in and out
UIWebView Zoom in and out  Hi, Can anyone give me the example of tap and zoom in and out the pdf loaded on uiwebview?? Thanks
Zoom Out Excel
zoom out excel       In this program we are going to make a java program through which we can zoom out(+) an excel sheet. This means you can make an excel sheet larger
Image Zoom Behavior in Flex 4
Flex Zoom Image Effects:- In Graphical interface we can make components larger... an image component with the help of zoom behavior in flex. In this tutorial we can set...; for zoom effects for image zoom. Flex Image Zooming Behavior Example:- <
Zoom Image with the help of play and reverse mehod in flex
Flex Zoom with the help of Action Script:- In this tutorial you can see how to apply zoom through mouse events if  mouseup on the  image component  are zoomin and mouseout image zoom out. you can see how to use doZoom
MX Zoom Effect in Flex4
MX Zoom Effect in Flex4: The component will zoom in or out on a center point using Zoom effect. The tag of Zoom effect is <mx:Zoom>. The syntax is following: <mx:Zoom id="ID" originX="Calculated"
Zoom Image section using jQuery plug-in
Zoom Image section using jQuery plug-in In this section, you will learn how to zoom an image section by hovering mouse on it using jQuery. The plug-in ,we... this box on image's any area , it will zoom that area. zoomImage.html <
java code - Java Beginners
java code  can u please post java code for zoom in and zoom out an bufferedImage class image
uiwebview zoom
uiwebview zoom  Hi, I want to zoom UIWebview programmatically... to set zoom level. for (UIScrollView *scroll in [webView subviews]) { //Set the zoom level. [scroll setZoomScale:2.5f animated:YES
Image swap on MouseOver ann Mouse out
Image swap on MouseOver ann Mouse out  I tried ur code for multiple images but didnt get the right answer...i dont want the hardcodded code...a code...(); arr[1] = new Image(); arr[1].src = "1.jpg"; arr[2] = new Image(); arr[2].src
with out class - Java Beginners
with out class  can we write a program with out a class in core java?if yes,give example
mkmapview zoom to current location
mkmapview zoom to current location  How can i zoom map to the current location
UIWebView zoom not working
UIWebView zoom not working  Hi, I don't know why UIWebView zoom not working? Tell the solution. Thanks   Hi, Open the .xib file and set scalesPageToFit to YES. Thanks
UIImageView UIScrollView Zoom
UIImageView UIScrollView Zoom   I am trying to implement a Zoomin / Zoomout feature in UIImageView and wanted to have the scroll capability init.   UIImageView *tempImage = [[UIImageView alloc]initWithImage:[UIImage
Java Image Browsing Applet
Java Image Browsing Applet  Hi. I want to create an applet which is embedded in html page which display image by browsing the files in the computers hard disk... Please help me out
image compression - Java Beginners
image compression  image compression in java coding
java image compression - Java Beginners
java image compression  image compression in java
A Java Program That Prints Out Result Via Printer
A Java Program That Prints Out Result Via Printer  A Java Program That Prints Out Result Through Printer Depending upon paper size , and print the calculated result on printer and save result as text file
Image Processing Java
://www.universalwebservices.net/web-programming-resources/java/adjust-jpeg-image-compression...Image Processing Java  Using This Code I Compressed A JPEG Image And the Original Size of the image is 257kb and The Compressed Image Size Is 27kb
java rotate image
java rotate image   How to rotate image to 90 and 180. can you please post an example to rotate image
image - Java Beginners
image  how to identify the watermarked image? or how to convert the watermarked image into original image? can you send that corresponding java code
image retrieve - Java Beginners
Image Retrieve  How to retrieve the image from mysql field using java
how to run java application with out stoping
how to run java application with out stoping  I have one java application to download some pdf file but its going to stop downloading after some time it not giving any errors any thing can any one help me to solve this problem
Write a java program that prints out the following menu???
Write a java program that prints out the following menu???  Write a java program that prints out the following menu. Auser can interact with the menu using numbers (1,2,3,4,5,6). The menu will be printed again if the user enters
How to handle Transaction IN and OUT in Inventory using java
How to handle Transaction IN and OUT in Inventory using java  Hi... when the items are OUT, again same scan two times as we have two barcodes... and just make TransactionStatus, Dt.of.Transaction,InventoryQty to OUT, watever
Image using Java coding
Image using Java coding  Hai, Display image in pdf file using Java coding through Xsl file.. Please help me.. xsl file generate the pdf file
how to highlight the field in image,when i have entered into that corresponding field's textbox-any one help out
how to highlight the field in image,when i have entered into that corresponding field's textbox-any one help out  how to highlight the field in image... consist of a jpeg image on the top and below that image fields(text boxes) exist
image upload in java
image upload in java  Hi, I am working with java. In my application i want to give facility to user to add and change image. I use open dialog box to select image, it will work properly i.e on button click open dialog is open
image save to folder in java
image save to folder in java  Hi, I am working with java. In my application i want to give facility to user to add and change image. I use open dialog box to select image, it will work properly i.e on button click open dialog