Solved

java graphics..201 points

Posted on 2002-06-25
6
188 Views
Last Modified: 2010-03-31
Is it posible in java to replace a part of image with other image.
if posible give me a solution please.Very urgent...


the html simulation is available in the below link
http://www.atlantainfotech.net/floor/floor_image.htm
0
Comment
Question by:ravi24
6 Comments
 
LVL 92

Accepted Solution

by:
objects earned 201 total points
ID: 7106780
Graphics g = image1.getGraphics();
g.drawImage(x, y, image2, null);
0
 

Author Comment

by:ravi24
ID: 7107226
i need to paste a image to a existing image in diferend size like diamondsize, or triangle..
0
 
LVL 3

Expert Comment

by:daitt
ID: 7107884
You can try Graphics.setClip(Shape) or Graphics2D.clip(Shape) to clip your graphics object, after that you can draw images on your graphics object. Only area inside clip will be drawn.
0
 
LVL 92

Expert Comment

by:objects
ID: 7109534
The x, y coordinates in my comment above specify the location in image1 you want to paint image2.
0
 
LVL 35

Expert Comment

by:girionis
ID: 8860698
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this
question is:

- points to objects

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
allswap challenge 6 80
base64 decode encode 12 122
JList custom Cell Renderer refresh 15 53
varialbe initialization 11 30
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now