# How to change the icon of your application using PJOGL.setIcon()?

**URL:** <https://discourse.processing.org/t/how-to-change-the-icon-of-your-application-using-pjogl-seticon/34236>\
**Category:** Coding Questions\
**Created:** [December 22, 2021, 12:05am UTC](https://discourse.processing.org/t/how-to-change-the-icon-of-your-application-using-pjogl-seticon/34236 "2021-12-22T00:05:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dwight](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@Dwight](https://discourse.processing.org/u/Dwight)\
**Post date:** [December 22, 2021, 12:05am UTC](https://discourse.processing.org/t/how-to-change-the-icon-of-your-application-using-pjogl-seticon/34236/1 "2021-12-22T00:05:58Z")

</div>

Hello there. I’m writing an application in processing, and I want to change application’s default icon on the taskbar.

I know how this can be done by using `surface.setIcon(PImage)`. But this doesn’t work when I’m using P3D, or P2D because I get this error:

 ![Screenshot (62)](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e6eac38d3c6753d0aeb2f8d5e0c1b3685eb2de40.png)

But when I use `PJOGL.setIcon(filename)`, the image never replaces the default application image with the image I want, despite it being in the sketch’s data folder (I don’t get any errors either). Is there any reason why this is happening?

EDIT: I am so sorry, I made a very silly mistake 🙃 . I didn’t read the whole error. I managed to fix this by doing this:

```auto
void setup() {
  
}
void settings() {
  size(100, 100, P3D);
  PJOGL.setIcon("Sketch_Icon.png");
}

```

instead of this:

```auto
void setup() {
  //PImage image = loadImage("Sketch_Icon.png","png");
  size(500, 500, P3D);
  PJOGL.setIcon("Sketch_Icon.png");
}

```

---

<div class="post-metadata">

**Author:** ![Brahvim](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/brahvim/32/14756_2.png) [@Brahvim](https://discourse.processing.org/u/Brahvim)\
**Post date:** [December 22, 2021, 3:01pm UTC](https://discourse.processing.org/t/how-to-change-the-icon-of-your-application-using-pjogl-seticon/34236/2 "2021-12-22T15:01:50Z")

</div>

Woah, this even helped me, **thanks!**
