Solved

java graphics..201 points

Posted on 2002-06-25
6
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

719 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