# Beginners

**URL:** https://discourse.processing.org/c/processing/processing-beginners/14.md?page=6

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 7

---

## ["Translation Trouble " while installing Processing 4.2](https://discourse.processing.org/t/translation-trouble-while-installing-processing-4-2/41730)

<div class="topic-metadata">

**Author:** [@Tawsif\_Khan](https://discourse.processing.org/u/Tawsif_Khan)\
**Replies:** 2\
**Last updated:** [April 15, 2023, 11:32am UTC](https://discourse.processing.org/t/translation-trouble-while-installing-processing-4-2/41730 "2023-04-15T11:32:29Z")

</div>

Hi Having problem while opening the Processing 4.2 .exe

---

## [Hi I need help with this question (triangle at mouse position)](https://discourse.processing.org/t/hi-i-need-help-with-this-question-triangle-at-mouse-position/41593)

<div class="topic-metadata">

**Author:** [@Computerscience](https://discourse.processing.org/u/Computerscience)\
**Replies:** 4\
**Last updated:** [April 9, 2023, 9:07pm UTC](https://discourse.processing.org/t/hi-i-need-help-with-this-question-triangle-at-mouse-position/41593 "2023-04-09T21:07:24Z")

</div>

Write a program to draw a triangle() with its center at the mouse pointer. The triangle should not change size or rotate as it moves. Give each triangle a different fill() colour. Try using a different mouse cursor.

---

## [\`keyPressed\` event does not trigger with Java project referencing \`core.jar\`](https://discourse.processing.org/t/keypressed-event-does-not-trigger-with-java-project-referencing-core-jar/41655)

<div class="topic-metadata">

**Author:** [@benjamin-thomas](https://discourse.processing.org/u/benjamin-thomas)\
**Replies:** 4\
**Last updated:** [April 8, 2023, 5:27pm UTC](https://discourse.processing.org/t/keypressed-event-does-not-trigger-with-java-project-referencing-core-jar/41655 "2023-04-08T17:27:18Z")

</div>

Hello! I’d like to play with Processing, but I’d favor using IntelliJ rather than the custom IDE. I’ve managed to get a basic project running, however the key events don’t seem to register. Here’s a minimal example. i…

---

## [Do BW (alpha) values need to be int \[0..255\]?](https://discourse.processing.org/t/do-bw-alpha-values-need-to-be-int-0-255/41489)

<div class="topic-metadata">

**Author:** [@MuddyGardener](https://discourse.processing.org/u/MuddyGardener)\
**Replies:** 7\
**Last updated:** [March 31, 2023, 10:42am UTC](https://discourse.processing.org/t/do-bw-alpha-values-need-to-be-int-0-255/41489 "2023-03-31T10:42:02Z")

</div>

How many levels of Black&White are allowed in the pixel alpha values? I’m trying to work this out by trial and error, and confusing myself. The reference says the value needs to be between 0…255, but not as far as I ca…

---

## [Render PImage using P2D?](https://discourse.processing.org/t/render-pimage-using-p2d/41429)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 4\
**Last updated:** [March 25, 2023, 12:19pm UTC](https://discourse.processing.org/t/render-pimage-using-p2d/41429 "2023-03-25T12:19:05Z")

</div>

Is it possible to render a PImage as with P2D like it is possible to render PGraphics with P2D too.

---

## [Having many PGraphics loaded lags](https://discourse.processing.org/t/having-many-pgraphics-loaded-lags/41396)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 9\
**Last updated:** [March 24, 2023, 2:38pm UTC](https://discourse.processing.org/t/having-many-pgraphics-loaded-lags/41396 "2023-03-24T14:38:47Z")

</div>

Is it possible to prevent high gui usage with like 128 pgraphics?

---

## [ArrayList of ArrayLists (dynamic 2D array) of custom class](https://discourse.processing.org/t/arraylist-of-arraylists-dynamic-2d-array-of-custom-class/27923)

<div class="topic-metadata">

**Author:** [@ProgrammingN00b](https://discourse.processing.org/u/ProgrammingN00b)\
**Replies:** 41\
**Last updated:** [March 19, 2023, 2:35pm UTC](https://discourse.processing.org/t/arraylist-of-arraylists-dynamic-2d-array-of-custom-class/27923 "2023-03-19T14:35:19Z")

</div>

Hello everybody! So, I just tried to create a ArrayList of ArrayLists with a custom class. However I am a bit stuck on how to read from / write to certain elements in this ArrayList thing. class Event { //The …

---

## [Unable to catch a "connection refused"](https://discourse.processing.org/t/unable-to-catch-a-connection-refused/41280)

<div class="topic-metadata">

**Author:** [@Lednev](https://discourse.processing.org/u/Lednev)\
**Replies:** 6\
**Last updated:** [March 15, 2023, 12:01pm UTC](https://discourse.processing.org/t/unable-to-catch-a-connection-refused/41280 "2023-03-15T12:01:23Z")

</div>

This piece of code throws an error which i need it to ignore. What am i doing wrong? import websockets.\*; WebsocketClient ws; void setup() { size(400, 400); try { ws = new WebsocketClient(this, "ws://localh…

---

## [HSV Space by Ben Fry](https://discourse.processing.org/t/hsv-space-by-ben-fry/41333)

<div class="topic-metadata">

**Author:** [@fakeshop](https://discourse.processing.org/u/fakeshop)\
**Replies:** 0\
**Last updated:** [March 17, 2023, 11:47am UTC](https://discourse.processing.org/t/hsv-space-by-ben-fry/41333 "2023-03-17T11:47:52Z")

</div>

Hello, Im working with this sketch HSV Space by Ben Fry. Arrange the pixels from live video into the HSV Color Cone. which is included in \*/Video Library for Processing 3 for translation of webcam image into 3D te…

---

## [Cant keep open both cards in memorygame using ArrayLists](https://discourse.processing.org/t/cant-keep-open-both-cards-in-memorygame-using-arraylists/41263)

<div class="topic-metadata">

**Author:** [@Yokiyami](https://discourse.processing.org/u/Yokiyami)\
**Replies:** 5\
**Last updated:** [March 15, 2023, 4:04pm UTC](https://discourse.processing.org/t/cant-keep-open-both-cards-in-memorygame-using-arraylists/41263 "2023-03-15T16:04:35Z")

</div>

Hello, I have made a memorygame using processing. We arent allowed to use classes. So i have used ArrayLists instead. Now i just cant seem to fix this bug: “when i click open the second card it sometime immediatly clos…

---

## [Demo sketches are stuttering / hanging up](https://discourse.processing.org/t/demo-sketches-are-stuttering-hanging-up/41268)

<div class="topic-metadata">

**Author:** [@User442B](https://discourse.processing.org/u/User442B)\
**Replies:** 3\
**Last updated:** [March 15, 2023, 1:38am UTC](https://discourse.processing.org/t/demo-sketches-are-stuttering-hanging-up/41268 "2023-03-15T01:38:34Z")

</div>

Hi. I recently installed processing and have begun learning it. I have noticed that my sketches are stuttering, sometimes even hanging up for a moment. This happens even when I run demo sketches, such as Bounce from the …

---

## [How to position box](https://discourse.processing.org/t/how-to-position-box/41154)

<div class="topic-metadata">

**Author:** [@Dave](https://discourse.processing.org/u/Dave)\
**Replies:** 2\
**Last updated:** [March 7, 2023, 9:35am UTC](https://discourse.processing.org/t/how-to-position-box/41154 "2023-03-07T09:35:27Z")

</div>

The code below is from the example 's that spins a box in the centre of the screen. Can someone please tell me how i move the box to spin in a different part of the screen Thankyou for your time // GetTessGroups, by A…

---

## [Help with analyzing file with Sound Library](https://discourse.processing.org/t/help-with-analyzing-file-with-sound-library/41166)

<div class="topic-metadata">

**Author:** [@andew](https://discourse.processing.org/u/andew)\
**Replies:** 2\
**Last updated:** [March 6, 2023, 8:32pm UTC](https://discourse.processing.org/t/help-with-analyzing-file-with-sound-library/41166 "2023-03-06T20:32:27Z")

</div>

Hello, I am extremely new to coding so apologies if my formatting or knowledge is off. I am trying to analyze a sound file using the Sound Library and display a visualization of it using the Fast Fourier Transform (FFT)…

---

## [NullPointerExpection in for loop](https://discourse.processing.org/t/nullpointerexpection-in-for-loop/41150)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 3\
**Last updated:** [March 5, 2023, 11:09am UTC](https://discourse.processing.org/t/nullpointerexpection-in-for-loop/41150 "2023-03-05T11:09:37Z")

</div>

for(int i = maxlayers+1; i \> 0; i-=1) { image(layers\[i+1\], xpos, ypos, xsize\*zoomx, ysize\*zoomy); } This code for some reason just return “NPE NullPointerExpection” why? i dont know! thats why im asking you! A…

---

## [Random object of four in each square of a grid](https://discourse.processing.org/t/random-object-of-four-in-each-square-of-a-grid/41034)

<div class="topic-metadata">

**Author:** [@i-draw-monkeys](https://discourse.processing.org/u/i-draw-monkeys)\
**Replies:** 13\
**Last updated:** [March 2, 2023, 7:03pm UTC](https://discourse.processing.org/t/random-object-of-four-in-each-square-of-a-grid/41034 "2023-03-02T19:03:17Z")

</div>

I feel like I should know the answer to this or figure it out but I feel stuck. I am drawing a grid, let’s say 4x4, and I have 4 different shapes or items that I want to draw. Each frame I want each square of my grid to…

---

## [Binary Search algorithm](https://discourse.processing.org/t/binary-search-algorithm/40996)

<div class="topic-metadata">

**Author:** [@neon124](https://discourse.processing.org/u/neon124)\
**Replies:** 1\
**Last updated:** [February 22, 2023, 2:30pm UTC](https://discourse.processing.org/t/binary-search-algorithm/40996 "2023-02-22T14:30:38Z")

</div>

To find a record, I’m using binary search. My question is not about whether or not the data is present. My questions are listed here. if data are in following order 1 2 3 4 4 5 5 5 6 7 8 8 9 10 11 If I look for 5 whe…

---

## [Illegal modifier for the local class player; only abstract or final is permitted](https://discourse.processing.org/t/illegal-modifier-for-the-local-class-player-only-abstract-or-final-is-permitted/40970)

<div class="topic-metadata">

**Author:** [@shoux2](https://discourse.processing.org/u/shoux2)\
**Replies:** 4\
**Last updated:** [February 21, 2023, 10:22am UTC](https://discourse.processing.org/t/illegal-modifier-for-the-local-class-player-only-abstract-or-final-is-permitted/40970 "2023-02-21T10:22:32Z")

</div>

void player() { public class player { private int dx; private int dy; private int x = 40; private int y = 60; private int w; private int h; private Image image; public player() { …

---

## [How do you import a class](https://discourse.processing.org/t/how-do-you-import-a-class/40971)

<div class="topic-metadata">

**Author:** [@shoux2](https://discourse.processing.org/u/shoux2)\
**Replies:** 3\
**Last updated:** [February 21, 2023, 10:53am UTC](https://discourse.processing.org/t/how-do-you-import-a-class/40971 "2023-02-21T10:53:15Z")

</div>

Main import java.awt.Image; import java.awt.event.KeyEvent; import javax.swing.ImageIcon; PImage gawd; PImage god; PImage lt33; void setup() { size(500, 500); background(50); scene1(); gawd = loadImage("gawd.p…

---

## [Character ArrayList (with small Editor for one line of text)](https://discourse.processing.org/t/character-arraylist-with-small-editor-for-one-line-of-text/40967)

<div class="topic-metadata">

**Author:** [@nanto2016](https://discourse.processing.org/u/nanto2016)\
**Replies:** 2\
**Last updated:** [February 20, 2023, 9:52pm UTC](https://discourse.processing.org/t/character-arraylist-with-small-editor-for-one-line-of-text/40967 "2023-02-20T21:52:07Z")

</div>

I want to create an ArrayList of chars, how would I do this? ArrayList\<char\> a = new ArrayList\<char\>(); doesn’t work. Same for all primitive types, but int and some others have their own list datatypes. so I could use a…

---

## [Changing Stroke and Fill of a PShape in realtime](https://discourse.processing.org/t/changing-stroke-and-fill-of-a-pshape-in-realtime/40944)

<div class="topic-metadata">

**Author:** [@animalfrommars](https://discourse.processing.org/u/animalfrommars)\
**Replies:** 5\
**Last updated:** [February 16, 2023, 9:42pm UTC](https://discourse.processing.org/t/changing-stroke-and-fill-of-a-pshape-in-realtime/40944 "2023-02-16T21:42:28Z")

</div>

Hello, Could any one explain me how to change the Stroke and the Fill of a PShape in realtime ? See the code below. Thank you very much for your help. PShape D; void setup() { size(400, 400, P3D); D = createShape…

---

## [Catching image failure is not working (try/catch)](https://discourse.processing.org/t/catching-image-failure-is-not-working-try-catch/40890)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 4\
**Last updated:** [February 11, 2023, 5:37pm UTC](https://discourse.processing.org/t/catching-image-failure-is-not-working-try-catch/40890 "2023-02-11T17:37:10Z")

</div>

This doesnt work! void setup() { try { image = loadImage("image.png"); } catch (Exception e) { image = loadImage("error.png"); } }

---

## [How to do an array of IntLists?](https://discourse.processing.org/t/how-to-do-an-array-of-intlists/40894)

<div class="topic-metadata">

**Author:** [@Rektic](https://discourse.processing.org/u/Rektic)\
**Replies:** 4\
**Last updated:** [February 10, 2023, 11:09pm UTC](https://discourse.processing.org/t/how-to-do-an-array-of-intlists/40894 "2023-02-10T23:09:13Z")

</div>

There seems to be a way to make an array of IntLists (I know it sounds weird but I need it) but it throws an error. \</\> IntList test = new IntList\[5\]; void setup(){ test\[3\].append(8); println(test\[3\].get(0)); } \</\>…

---

## [Unable to get SVG to export](https://discourse.processing.org/t/unable-to-get-svg-to-export/40882)

<div class="topic-metadata">

**Author:** [@gummy12](https://discourse.processing.org/u/gummy12)\
**Replies:** 2\
**Last updated:** [February 9, 2023, 11:06am UTC](https://discourse.processing.org/t/unable-to-get-svg-to-export/40882 "2023-02-09T11:06:20Z")

</div>

\< import processing.svg.\*; void setup(){ noLoop(); beginRecord(SVG,“asdfasdf2.svg”); size(1000, 1000,P3D); noFill(); strokeWeight(2); beginShape(); int squarenumber = 12; for (int i = 1; i\<squarenumber; i++){ …

---

## [Is there a way to put the entire function signature with arguments into the thread call?](https://discourse.processing.org/t/is-there-a-way-to-put-the-entire-function-signature-with-arguments-into-the-thread-call/40880)

<div class="topic-metadata">

**Author:** [@advancecoder](https://discourse.processing.org/u/advancecoder)\
**Replies:** 1\
**Last updated:** [February 9, 2023, 2:34am UTC](https://discourse.processing.org/t/is-there-a-way-to-put-the-entire-function-signature-with-arguments-into-the-thread-call/40880 "2023-02-09T02:34:58Z")

</div>

Hi, Is there a way to put the entire function signature with arguments into the thread call? What would you add to the “requestData” call? String time = ""; void setup() { size(100, 100); } void draw() { backg…

---

## [Can't run the first example in "Getting Started"](https://discourse.processing.org/t/cant-run-the-first-example-in-getting-started/40866)

<div class="topic-metadata">

**Author:** [@TimH02130](https://discourse.processing.org/u/TimH02130)\
**Replies:** 6\
**Last updated:** [February 7, 2023, 9:08pm UTC](https://discourse.processing.org/t/cant-run-the-first-example-in-getting-started/40866 "2023-02-07T21:08:52Z")

</div>

I started processing v4.1.2 for the first time and typed in the first example from the overview, i.e. ellipse(50, 50, 80, 80); and the message area immediately turns red and says \`the function “ellipse(int, int, int, i…

---

## [Slow PGraphics at high resolution!](https://discourse.processing.org/t/slow-pgraphics-at-high-resolution/40864)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 1\
**Last updated:** [February 7, 2023, 5:26pm UTC](https://discourse.processing.org/t/slow-pgraphics-at-high-resolution/40864 "2023-02-07T17:26:09Z")

</div>

Is it possible to make a 4000\*4000 pixel big pgraphics with 60 fps? or access only one part of a graphics object? edit: or could i run the code on the gpu & does it use all cores of the cpu by default?

---

## [Mouse clicked with arrays issue (wolves and lambs)](https://discourse.processing.org/t/mouse-clicked-with-arrays-issue-wolves-and-lambs/40807)

<div class="topic-metadata">

**Author:** [@andprocessing](https://discourse.processing.org/u/andprocessing)\
**Replies:** 21\
**Last updated:** [February 3, 2023, 12:24am UTC](https://discourse.processing.org/t/mouse-clicked-with-arrays-issue-wolves-and-lambs/40807 "2023-02-03T00:24:31Z")

</div>

Hi! So there’s this assignment i need to do. I made a game where you basically have to find a wolf inside a pack of sheep. Once you find it, you have to click on it, and it will move on to the next level. You need to fin…

---

## [Mouse clicked issue with arrays](https://discourse.processing.org/t/mouse-clicked-issue-with-arrays/40804)

<div class="topic-metadata">

**Author:** [@andprocessing](https://discourse.processing.org/u/andprocessing)\
**Replies:** 1\
**Last updated:** [February 2, 2023, 6:56pm UTC](https://discourse.processing.org/t/mouse-clicked-issue-with-arrays/40804 "2023-02-02T18:56:18Z")

</div>

Hi! I have this school assignment. I basically made a game where you have to find a wolf in a pack of sheep. Once you click the wolf, it restarts and you just have to get more points until the timer runs out. The thing i…

---

## [Warning Extreme Newbie - I want to add a batch command to an image process](https://discourse.processing.org/t/warning-extreme-newbie-i-want-to-add-a-batch-command-to-an-image-process/40761)

<div class="topic-metadata">

**Author:** [@DRed](https://discourse.processing.org/u/DRed)\
**Replies:** 13\
**Last updated:** [February 1, 2023, 8:52am UTC](https://discourse.processing.org/t/warning-extreme-newbie-i-want-to-add-a-batch-command-to-an-image-process/40761 "2023-02-01T08:52:33Z")

</div>

Hi I am using a copy of ADSFPixelSort by Kim Asendorf to create a video sequence. Rather than re-entering the different file names (the numbers at the end of each of the image sequence files) I’d like to just have the p…

---

## [Class in function](https://discourse.processing.org/t/class-in-function/40738)

<div class="topic-metadata">

**Author:** [@OverLord](https://discourse.processing.org/u/OverLord)\
**Replies:** 5\
**Last updated:** [January 30, 2023, 4:19pm UTC](https://discourse.processing.org/t/class-in-function/40738 "2023-01-30T16:19:56Z")

</div>

Perhaps this is as silly as possible what I want to do. Is it possible to create a function that will create an initialize class.

[Previous page](https://discourse.processing.org/c/processing/processing-beginners/14.md?page=5)

[Next page](https://discourse.processing.org/c/processing/processing-beginners/14.md?page=7)
