# Display count needs to be implemented for non-AWT

**URL:** <https://discourse.processing.org/t/display-count-needs-to-be-implemented-for-non-awt/49232>\
**Category:** Processing\
**Created:** [August 21, 2026, 9:45am UTC](https://discourse.processing.org/t/display-count-needs-to-be-implemented-for-non-awt/49232 "2026-08-21T09:45:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexRussell](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/alexrussell/32/22120_2.png) [@AlexRussell](https://discourse.processing.org/u/AlexRussell)\
**Post date:** [August 21, 2026, 9:45am UTC](https://discourse.processing.org/t/display-count-needs-to-be-implemented-for-non-awt/49232/1 "2026-08-21T09:45:14Z")

</div>

Since I updated to Processing 4.5.6 (on Win 11), every sketch runs okay, but gets the error message:  
“display count needs to be implemented for non-AWT  
AWT disabled, displayWidth/displayHeight will be 0”  
Nothing here: [fullScreen(P3D) not fullscreening on Windows](https://discourse.processing.org/t/fullscreen-p3d-not-fullscreening-on-windows/49065) or on the pages it links to seems to be helping.  
I’m using a fixed display window, size(1080, 1080) without P2D or P3D, with pixelDensity(1)  
It doesn’t actually seem to be affecting how the code works, but I wouldn’t mind knowing why this is happening and if it is possible to get rid of it.  
Any help very gratefully received by a first-time poster. Thank you.

---

<div class="post-metadata">

**Author:** ![Leo\_N](https://avatars.discourse-cdn.com/v4/letter/l/bcef8e/32.png) [@Leo\_N](https://discourse.processing.org/u/Leo_N)\
**Post date:** [August 28, 2026, 6:08am UTC](https://discourse.processing.org/t/display-count-needs-to-be-implemented-for-non-awt/49232/2 "2026-08-28T06:08:40Z")

</div>

I’m experiencing the same issue. I upgraded from 4.5.5 to 4.5.6, and even the simplest code triggers the warning.

I also use secondary window functionality, and the warning appears every time a secondary window is called.

I’ve reverted to 4.5.5 for now because I capture system output to log, and the repeated warnings are flooding my logs.

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [August 28, 2026, 4:12pm UTC](https://discourse.processing.org/t/display-count-needs-to-be-implemented-for-non-awt/49232/3 "2026-08-28T16:12:21Z")

</div>

Take a look at this reference to gain some insight into why this is happening:

> <https://github.com/processing/processing4/blob/main/core/src/processing/core/PApplet.java>

This file contains this code:

```processing
 public int displayDensity() {
    if (display != SPAN && (fullScreen || present)) {
      return displayDensity(display);
    }

    int displayCount = 0;
    if (!disableAWT) {
      displayCount = ShimAWT.getDisplayCount();
    } else {
      // https://github.com/processing/processing4/issues/57
      System.err.println("display count needs to be implemented for non-AWT");
    }
    // walk through all displays, use 2 if any display is 2
    for (int i = 0; i < displayCount; i++) {
      if (displayDensity(i+1) == 2) {
        return 2;
      }
    }
    // If nobody's density is 2 then everyone is 1
    return 1;
  }

```

The error message appears to be thrown because `disableAWT` is set to true. That occurs here:

```processing
        case ARGS_DISABLE_AWT:
            disableAWT = true;
            break;

```

It apparently was set to `true` for this reason:

`/** Disable AWT so that LWJGL and others can run */`  
`static public final String ARGS_DISABLE_AWT = "--disable-awt";`

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [August 29, 2026, 3:38pm UTC](https://discourse.processing.org/t/display-count-needs-to-be-implemented-for-non-awt/49232/4 "2026-08-29T15:38:06Z")

</div>

> [@AlexRussell](#):
>
> It doesn’t actually seem to be affecting how the code works, but I wouldn’t mind knowing why this is happening and if it is possible to get rid of it.  
> Any help very gratefully received by a first-time poster. Thank you.

Hello @AlexRussell,

Try this in a sketch:  
`println("disableAWT: ", disableAWT);` // true for 4.5.6 and false for 4.5.5

This was (below) added to Processing 4.5.6 _and it is NOT in 4.5.5_:

> <https://github.com/processing/processing4/blob/main/java/src/processing/mode/java/runner/Runner.java#L519>

It now checks the argument at startup and displays the errors _unconditionally_ in 4.5.6 that you see.

Trail of breadcrumbs:

> <https://github.com/processing/processing4/blob/main/core/src/processing/core/PApplet.java#L10037>

> <https://github.com/processing/processing4/blob/main/core/src/processing/core/PApplet.java#L844>

> <https://github.com/processing/processing4/blob/main/core/src/processing/core/PApplet.java#L1012>

You can also make a custom version of Processing!

_[processing4/BUILD.md at main · processing/processing4 · GitHub](https://github.com/processing/processing4/blob/main/BUILD.md)_

Note:  
I have yet to test out the above in a custom build.  
Migrating to a new PC and have other priorities.  
I will follow up once I do this… not anytime soon.

`:)`

---

<div class="post-metadata">

**Author:** ![sableraph](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sableraph/32/251_2.png) [@sableraph](https://discourse.processing.org/u/sableraph)\
**Post date:** [August 31, 2026, 1:40pm UTC](https://discourse.processing.org/t/display-count-needs-to-be-implemented-for-non-awt/49232/5 "2026-08-31T13:40:09Z")

</div>

Thanks for looking into this. I reported this bug in the issue below back in July, and just added a link to this conversation. Feel free to share your findings in the replies and/or suggest/contribute a fix.

> <https://github.com/processing/processing4/issues/1551>
>
> \### Most appropriate sub-area of Processing 4?
> 
> Core/Environment/Rendering
> 
> \### …Processing version
> 
> 4.5.6
> 
> \### Operating system
> 
> macOS Tahoe 26.5.2 (25F84)
> 
> \### Bug description
> 
> Running an empty sketch in Processing 4.5.6 produces the following warnings:
> 
> 
> \`\`\`
> display count needs to be implemented for non-AWT
> AWT disabled, displayWidth/displayHeight will be 0
> \`\`\`
> 
> 
> Additionally, calling \`pixelDensity(2)\` produces this error:
> 
> 
> \`\`\`
> pixelDensity(2) is not available for this display
> \`\`\`
> 
> Processing should detect the display dimensions and use \`pixelDensity(2)\` by default on the built-in Retina display.
> 
> Regression for:
> 
> \* https://github.com/processing/processing4/pull/1226
> \* https://github.com/processing/processing4/pull/1038
> 
> \### Steps to reproduce this
> 
> 1. Install Processing 4.5.6 on macOS.
> 2. Open Processing and create a new sketch.
> 3. Run the sketch below.
> 4. Observe the display-count and \`displayWidth\`/\`displayHeight\` warnings in the console.
> 5. Uncomment \`pixelDensity(2)\`.
> 6. Run the sketch again.
> 7. Observe the \`pixelDensity(2) is not available for this display\` error.
> 
> \### snippet
> 
> \`\`\`processing
> void setup(){
> size(640,400);
> //pixelDensity(2);
> }
> 
> void draw(){
> line(10,10,630,390);
> }
> \`\`\`
> 
> 
> \### Additional context
> 
> \<img width="1118" height="717" alt="Image" src="https://github.com/user-attachments/assets/76fb1896-cab4-4f41-811d-d05761e5874c" /\>
> 
> \### Would you like to work on the issue?
> 
> No, I’m just reporting the issue

---

<div class="post-metadata">

**Author:** ![AlexRussell](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/alexrussell/32/22120_2.png) [@AlexRussell](https://discourse.processing.org/u/AlexRussell)\
**Post date:** [August 31, 2026, 4:18pm UTC](https://discourse.processing.org/t/display-count-needs-to-be-implemented-for-non-awt/49232/6 "2026-08-31T16:18:33Z")

</div>

Thanks everyone for your help with this. I’ve added a comment to the issue @sableraph has raised on [GitHub](https://github.com/processing/processing4/issues/1551) noting that the issue is on PCs running Win 11 as well as Macs. I wish I could code well enough to help fix this!
