Solved

Buffered Image to ImageIcon

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This video teaches viewers about errors in exception handling.
Suggested Courses

617 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