Wednesday, September 10, 2008
Head First Book Collection Updating...
If you are in need of any more head first book,Comment and request here....
Friday, June 27, 2008
Dynamically Generating jpg & png Images - JAVA
You can add graphics and even texts to a existing image or generate a new one from this method.Just think that you need to add some text on some background,And generate it dynamically.this is the method for that.here it says how to give a picture and change it as we need (Adding some graphics) and generate it as a separate jpg or png, If you need to generate a completely new one,Just use
File file = new File();insted of the URL as a parameter.
import javax.imageio.*;
import java.io.*;
import java.awt.image.*;
import java.awt.*;
import java.lang.*;
import java.net.*;
public class Main {
public static void main(String[] args) {
// TODO code application logic here
// Create an image to save
try
{
WriteImage();
}
catch(IOException e)
{
System.out.println(e.toString());
}
}
public static void WriteImage() throws IOException
{
RenderedImage rendImage = myCreateImage();
// Save as PNG
File file = new File("C:/Program Files/
netbeans-5.5.1/enterprise3/apache-tomcat-5.5.17/webapps/ROOT/FormattedPics/Background.png"); //file path,can be any where elsein your pc, here it uses tomcat webapps folder for some other purpose.
ImageIO.write(rendImage, "png", file);
System.out.println("New Png Created");
}
// Returns a generated image.
public static RenderedImage myCreateImage() throws IOException
{
// int width = 100;
// int height = 100;
try
{
// Create a buffered image in which to draw
// BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
//location of the image to be modofied
BufferedImage bufferedImage = ImageIO.read(new URL("http://localhost:8084/SourcePics/newimage.png"));
// Create a graphics contents on the buffered image
Graphics2D g2d = bufferedImage.createGraphics();
// Draw graphics
// g2d.setColor(Color.BLUE);
// g2d.fillRect(0, 0, width, height);
// g2d.setColor(Color.GREEN);
// g2d.fillOval(0, 0, width, height);
g2d.drawString("text",40,80);
// Graphics context no longer needed so dispose it
g2d.dispose();
return bufferedImage;
}
catch(Exception e)
{
System.out.println("Error" + e.toString());
return null;
}
}
}
Plz send your comments here
Thursday, June 12, 2008
Sun_Certified_Java_Developer_Study_Guide
Study Guide
http://rapidshare.com/files/121838360/Sun_Certified_Java_Developer_Study_Guide.pdf
..............................
Exam Practice environment
http://rapidshare.com/files/121849411/WhizLabs_-_exam_practice_for_SCJP-5.zip
..............................
Java Little Black book
http://rapidshare.com/files/121843478/Java_2_Core_Language_Little_Black_Book.pdf
..............................
http://rapidshare.com/files/121838360/Sun_Certified_Java_Developer_Study_Guide.pdf
..............................
Exam Practice environment
http://rapidshare.com/files/121849411/WhizLabs_-_exam_practice_for_SCJP-5.zip
..............................
Java Little Black book
http://rapidshare.com/files/121843478/Java_2_Core_Language_Little_Black_Book.pdf
..............................
Monday, June 9, 2008
Kathy Sierra SCJP jdk 1.5 Reference Book
Kathy Sierra SCJP jdk 1.5 Reference Book,Download Here
http://rapidshare.com/files/121374160/
Kathy_Sierra_SCJP_jdk_1.5_Reference_Book.rar
..............................................................
http://rapidshare.com/files/121374160/
Kathy_Sierra_SCJP_jdk_1.5_Reference_Book.rar
..............................................................
Head First Java 2nd edition pdf - J2EE
Download Head First Java 2nd edition pdf - Not a Scanned Copy ,
Follow this link,
This is not a scanned copy,An original printed pdf.
This book is a reference for the java examinations ,which covers J2EE area.
http://rapidshare.com/files/121362557/
OReilly.Head.First.Servlets.and.JSP.2nd.Edition.Mar.2008.pdf
................
Follow this link,
This is not a scanned copy,An original printed pdf.
This book is a reference for the java examinations ,which covers J2EE area.
http://rapidshare.com/files/121362557/
OReilly.Head.First.Servlets.and.JSP.2nd.Edition.Mar.2008.pdf
................
Subscribe to:
Posts (Atom)