Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training Big Data and Hadoop Training Java Training  
 

JAVA image zoom in/out

Ads

 
 

Share on Google+Share on Google+

Avinash
JAVA image zoom in/out
2 Answer(s)      6 years and 11 months ago
Posted in : Framework
how to write function in java for image zoom in and zoom out using jFreeChart?
Ads
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???????


Ads









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
with out class - Java Beginners
with out class  can we write a program with out a class in core java?if yes,give example
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
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
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
mkmapview zoom to current location
mkmapview zoom to current location  How can i zoom map to the current location
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
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
java rotate image
java rotate image   How to rotate image to 90 and 180. can you please post an example to rotate image
image retrieve - Java Beginners
Image Retrieve  How to retrieve the image from mysql field using java
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
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 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
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
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 effects - Java Beginners
image effects  hey can u help me in loadin an image file... that will show you image crop effect: import java.sql.*; import java.awt.... java.awt.image.FilteredImageSource; public class Upload extends JPanel { BufferedImage image; Image img
java image slider or code 4 java-image slideshow
java image slider or code 4 java-image slideshow   plz help me out with java code for running an application in which images wil slide automatically... image slider 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
java image display - Java Beginners
java image display  How to display images in the folder dynamically with out using database using java and jsp  Hi friend, Code to help in solving the problem var galleryarray=new Array
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