Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

how do i get the icon in place

  Asked By: Viveka    Date: Jan 14    Category: Java    Views: 746
  

how can i get my icon on the top left side of the application?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Vidhya Iyer     Answered On: Jan 14

The first thing you have to do is load an
image....<br><br>There are all kinds of ways to do this. I do this in a
java application  like this....<br><br><br>Toolkit kit
= Toolkit.getDefaultToolkit();<br>Image image =
kit.getImage(url);<br>Image image = kit.getImage(filename);<br><br>Next,
there is a method in the JFrame or awt Frame<br>class
(which should be the base class for your applications'
frame) called <br><br>setIconImage(image);<br><br>Use
that and it should set your icon  in the upper left
corner... It will also be use for the icon when you
minumize it....<br><br>Stephen
McConnell<br>http://www.crosslogic.com

 
Answer #2    Answered By: Alvin Nguyen     Answered On: Jan 14

i have got my image as
the icon  using the code you have told but there is
this one slight problem that the image is not
transparent.......i mean the image shows the whole image in the
taskbar with the background of anyother color than
gray(the default windows color). <br><br>my question is:
how do i make the icon transparent so that it shows
only the icons useful picture, not the background of
the icon?

 
Answer #3    Answered By: Luki Fischer     Answered On: Jan 14

You are actually loading an "icon" as the thing
in the upper left  hand corner!<br><br>I've never
used an .icon file, I've been using .jpg or .gif files
as my image. The thing is going to display what you
load. It's designed to be OS independent and a .icon
image is basically "Windoz" specific.<br><br>Stephen
McConnell<br>http://www.crosslogic.com

 
Answer #4    Answered By: Steve Boyd     Answered On: Jan 14

how do i load an .icon file???????????

 
Didn't find what you were looking for? Find more on how do i get the icon in place Or get search suggestion and latest updates.




Tagged: