[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Changing system menu icon of JFrame

Posted on 2000-04-06
5
Medium Priority
?
276 Views
Last Modified: 2008-01-16
Hi,

I would like the icon for the system menu of a JFrame changed to my own custom icon. What I need to know is what kind of image file I need for the icon. Can a .GIF file do? And what resolution should it be?

Also, suppose my java application runs on a Windows system, and I want to create a custom desktop icon to launch my application. How do I make that icon? From what I can tell from a normal .EXE program, the icon is stored inside the .EXE file.
0
Comment
Question by:yongsing
[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
  • 3
5 Comments
 
LVL 16

Accepted Solution

by:
heyhey_ earned 60 total points
ID: 2692190
ImageIcon icon = new ImageIcon("system.gif");
frame.setIconImage(icon.getImage());
0
 
LVL 9

Author Comment

by:yongsing
ID: 2692765
But what pixel resolution should the system.gif file be? Should it be 16 x 16 or 32 x 32?
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2692933
I suppose that the image will be automatically resized ...


public synchronized void setIconImage(Image image)

Sets the image to display when this frame is iconized. Not all platforms support the concept of iconizing a window.

Parameters:
image - the icon image to be displayed
0
 
LVL 7

Expert Comment

by:Sasha_Mapa
ID: 2692947
You can use frame.getIconImage() to get the default one and check its size, but there are probably better solutions :-)
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 2693086
:)

well, actually I don't remember the size ... :) but I suppose that every Image object will be automatically resized.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

650 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