Solved

Buffered Image to ImageIcon

Posted on 2004-10-03
3
1,219 Views
Last Modified: 2012-06-27
Hi all,
how can I turn a BufferedImage to an ImageIcon?

I have printed screen, within a certain area, and I want to apply that Bufferend Image to a JButton, but it would seem that I need to make it an ImageIcon.. how can I cast between them?

Thanks!
0
Comment
Question by:rubberdi
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 20 total points
ID: 12210962
ImageIcon icon = new ImageIcon(bufferedImage);
0
 

Author Comment

by:rubberdi
ID: 12210979
Excellent, thanks alot CEHJ. :)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12210984
8-)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
diffSum example 4 50
more than one jdk and one jre 1 50
servlet web applications   metadata-complete="true" or false 3 112
Problem to Alipay 10 43
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

856 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