Solved

Buffered Image to ImageIcon

Posted on 2004-10-03
3
1,229 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
[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
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Notify sent to other threads in Java 9 54
jmeter usage 4 65
maximize the sum of fractions 33 76
Which is best Image Resizing Web service 11 42
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses

751 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