Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-2008, 05:23 PM
Member
 
Join Date: May 2008
Posts: 22
amith is on a distinguished road
other than paint repaint
any method is there to drawimage through this method instead of using paint repaint or paintcomponent methods like this
void load()
{
Graphics g;
try{
g=getGraphics();
g.drawImage(img,220,220,this);
}
catch(exception e)
{}
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-02-2008, 12:39 AM
serjant's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Ukraine,Zaporozhye
Posts: 160
serjant is on a distinguished road
Send a message via ICQ to serjant Send a message via Skype™ to serjant
Code:
public void paint(Graphics g){ Graphics2D g2=(Graphics2D)g;//casting to 2D g2.drawImage(new ImageIcon(/path/to/image).getImage(),220,220,this); }
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing parameters to paint mtd themburu Java Applets 3 07-14-2008 09:15 PM
How to create Animation: Paint and thread Java Tip java.awt 0 06-21-2008 09:42 PM
How to make a MouseClick paint an object Devilsfutbol17 New To Java 6 06-05-2008 01:54 PM
radio buttons and paint gtraylo Java Applets 2 05-20-2008 11:45 PM
paint() and paintComponent() goldhouse Java 2D 1 07-17-2007 04:43 AM


All times are GMT +3. The time now is 08:11 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org