Solved

Buffered Image to ImageIcon

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

Suggested Solutions

Title # Comments Views Activity
spring jars download 1 52
Tomcat: Unable to run tomcat service. 2 29
Crystal Reports Licensing Questions 4 60
java mysql insert application 14 44
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

756 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