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-17-2007, 05:21 AM
Member
 
Join Date: Mar 2007
Posts: 16
samson is on a distinguished road
Why this image background is black ?
Code:
public void drawShape(int w, int h){ Graphics2D graphics2D ; BufferedImage bufferedImage = new BufferedImage( 45, 56, BufferedImage.TYPE_INT_ARGB ); File imgFile = new File("C:\\test.jpg"); graphics2D = bufferedImage .createGraphics(); graphics2D .setBackground(Color.WHITE); graphics2D .setColor( Color.WHITE ); try { ImageIO.write( bufferedImage , "jpg", imgFile ); } catch ( IOException e ) { e.printStackTrace(); } }
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-17-2007, 05:24 AM
Member
 
Join Date: Mar 2007
Posts: 16
samson is on a distinguished road
Code:
graphics2D .setColor( Color.WHITE ); graphics2D .fillRect(0,0,45,56);
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
Center background image Floetic AWT / Swing 1 04-24-2008 06:50 PM
GUI... setting my background to an image, im using a JFrame newtojava7 New To Java 2 03-24-2008 06:29 AM
Converting multiple banded image into single banded image... Image enhancement archanajathan Advanced Java 0 01-08-2008 06:29 PM
Background image in java toby AWT / Swing 1 07-29-2007 08:15 AM
Implementing a red-black tree in java baltazar New To Java 1 07-13-2007 09:37 PM


All times are GMT +3. The time now is 03:47 AM.


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