• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Getting rid of Java Icon on the upper left hand corner

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know there is a way to get rid of that Java Icon on the upper left hand corner of your apps, but I can't, for the life of me remember how to do it. Can somebody please let me know how to do that if they know. Thanks.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
setIconImage(Image)
 
Wilson Mui
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to setIconImage() in the JFrame to null, but nothing happened? I thought maybe when I minimized it on the taskbar, then there would be no java icon as well, but again, there was no affect. Does anybody have any ideas as to how to get rid of that java icon on the upper lefthand corner of your apps, when using the MetalLookAndFeel?
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
setIconImage(Image image)
image parameter should not be null. If it is null, it will take the default image (java symbol). Try to give your own image.
~Viswa
 
Wilson Mui
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, this may sound stupid but how do you create an Image. The Image constructor doesn't seem to have any type of request for an external data input. The only way I've ever used an image was doing this:
Image testImage = new IconImage("[file_name]");
but I'm not sure if that is the way you're suppose to do it. I just don't see what Image is good for? And furthermore, I don't even think IconImage extends Image, so how come this works? Can somebody help me out a little?
Scratch that I never used Image before, it was always a straight up ImageIcon. So how do you use Image then?
[ May 26, 2003: Message edited by: Wilson Mui ]
 
Viswa Laksh
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Create a URL object and getResource of a image file. I think this following code snippet will help you.

Here
YourClass - Your Current program name.
someimage - file path of some image. e.g "images/smile.jpg"

~Viswa
 
Wilson Mui
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm, interesting, so it looks like the only way to get a handle to an Image, is through an ImageIcon. I didn't know that. But is there a way then to create an Image from "scratch" sort of speak. I mean to acutally use a constructor to create an Image object?
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope... Image doesn't have a (public) constructor. In addition to creating an Image using ImageIcon, there are also several createImage() methods in java.awt.Toolkit and getImage() methods in java.applet.Applet. If you are using JDK 1.4 there is also the new ImageIO API. And if you want to create an Image and not just load one from a file, you can use the BufferedImage class. It comes with a constructor.
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic