I really don't like the Java symbol as the icon for my game so I'd like to use a custom one isteand.

How and where would I add it into this code:

package Destiny;

public class Destiny_Starting_Window extends JPanel{

  JFrame window = new JFrame("DESTINY BETA 1.0 PC EDITION");

      File sound = new File("Sounds//Main Menu.wav");
      AudioInputStream ais = AudioSystem.getAudioInputStream(sound);
      Clip clip = AudioSystem.getClip();

    }catch(Exception e){

    window.setSize(1366 , 768);
  public void paint(Graphics g)
    ImageIcon background = new ImageIcon("Images//Destiny Main.png");

  • \$\begingroup\$ What kind of icon are you talking about? The icon shown at the border of the window, the icon shown in the explorer? Also what platforms are you considering? And are you talking about a bundled jar file or something else? \$\endgroup\$ – UnholySheep Jan 10 '17 at 19:51

When you compile your Java code, you are compiling it as Java bytecode.

It is not a standard executable, thus there is no definition of an "Icon" to it or anyone else. The operating system will use an Icon associated for Jar files, which gives the "Java symbol" as an icon.

  • \$\begingroup\$ I Mean The Java Symbol Like The Coffee Sign also I Dont Want To Bundle It Into A .exe Firstly Because It ain't finished Secondly Its For Mac. \$\endgroup\$ – Pheonix VX Jan 10 '17 at 23:47
  • \$\begingroup\$ @PheonixVX Either I'm confused on what exactly you are calling the "icon", or there is some lack of understanding how java works. Your code will be currently made into a cross platform java bytecode file, this will have a "Java Symbol Like The Coffee Sign". \$\endgroup\$ – dark_st3alth Jan 10 '17 at 23:51
  • \$\begingroup\$ @dark_st3alth , i think he mean like minecraft game , when the app launched , the icon at left top corner are changed to picture / sprite \$\endgroup\$ – user6668201 Jan 11 '17 at 9:20
  • \$\begingroup\$ Yes And No This Is For A Different Game But Yes The Picture / Sprite At The Top Left Hand Corner of A App. \$\endgroup\$ – Pheonix VX Jan 14 '17 at 5:05
  • \$\begingroup\$ This Is What I Mean Copy This Link pbs.twimg.com/profile_images/426420605945004032/… \$\endgroup\$ – Pheonix VX Jan 14 '17 at 5:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.