# Beginners

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

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

**Page:** 5

---

## [New to Arrays, help making a simple less than 10 lines code](https://discourse.processing.org/t/new-to-arrays-help-making-a-simple-less-than-10-lines-code/43147)

<div class="topic-metadata">

**Author:** [@beginn](https://discourse.processing.org/u/beginn)\
**Replies:** 3\
**Last updated:** [November 5, 2023, 12:54pm UTC](https://discourse.processing.org/t/new-to-arrays-help-making-a-simple-less-than-10-lines-code/43147 "2023-11-05T12:54:21Z")

</div>

Create an array of size 100 and fill it up with random numbers using a loop. Using a loop print all the numbers located at the “odd” indexes (i.e. numbers located at \[1\], \[3\], \[5\] etc.) of the array. I have– int array…

---

## [Can't use size() in setup()](https://discourse.processing.org/t/cant-use-size-in-setup/43008)

<div class="topic-metadata">

**Author:** [@berndbausch](https://discourse.processing.org/u/berndbausch)\
**Replies:** 2\
**Last updated:** [October 19, 2023, 7:50am UTC](https://discourse.processing.org/t/cant-use-size-in-setup/43008 "2023-10-19T07:50:48Z")

</div>

Trying to run a large sketch I cloned from Github, I get the error size() cannot be used here, see https://processing.org/reference/size\_.html Documentation says: the size() function must be the first line of code in…

---

## [I don't know what I am doing wrong! (class and brackets)](https://discourse.processing.org/t/i-dont-know-what-i-am-doing-wrong-class-and-brackets/42978)

<div class="topic-metadata">

**Author:** [@Amamallama](https://discourse.processing.org/u/Amamallama)\
**Replies:** 27\
**Last updated:** [October 17, 2023, 12:29pm UTC](https://discourse.processing.org/t/i-dont-know-what-i-am-doing-wrong-class-and-brackets/42978 "2023-10-17T12:29:47Z")

</div>

Doing the zoog assignment and we are starting with the class chapters. We are working on our zoog and I can’t figure out what is wrong with my code. I am a suppperrr beginner. My brain just isn’t processing (ha see what…

---

## [Get CMD output?](https://discourse.processing.org/t/get-cmd-output/42949)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 0\
**Last updated:** [October 12, 2023, 1:15am UTC](https://discourse.processing.org/t/get-cmd-output/42949 "2023-10-12T01:15:53Z")

</div>

Is there a way to get the bash output, that a bash file might produce? and can this run at 120fps or is this highly inefficient?

---

## [Enums in Processing](https://discourse.processing.org/t/enums-in-processing/42930)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 2\
**Last updated:** [October 9, 2023, 8:12pm UTC](https://discourse.processing.org/t/enums-in-processing/42930 "2023-10-09T20:12:51Z")

</div>

Do enums work in processing? I didn’t find an example sadly, would be great help if someone could provide an example! :slight\_smile:

---

## [Can I selectively delete something from canvas?](https://discourse.processing.org/t/can-i-selectively-delete-something-from-canvas/19617)

<div class="topic-metadata">

**Author:** [@berndbausch](https://discourse.processing.org/u/berndbausch)\
**Replies:** 6\
**Last updated:** [October 3, 2023, 10:24am UTC](https://discourse.processing.org/t/can-i-selectively-delete-something-from-canvas/19617 "2023-10-03T10:24:18Z")

</div>

I have seen this question asked before, and it seems the answer is no. Still, perhaps I am wrong… I am running a random walk inspired by Dan Shiffman’s first chapter of Nature of Code. It slowly creates a pretty pattern…

---

## [Introducing a New Free and Beginner-friendly Introductory Course on Processing!](https://discourse.processing.org/t/introducing-a-new-free-and-beginner-friendly-introductory-course-on-processing/42876)

<div class="topic-metadata">

**Author:** [@sableraph](https://discourse.processing.org/u/sableraph)\
**Replies:** 1\
**Last updated:** [October 2, 2023, 2:30pm UTC](https://discourse.processing.org/t/introducing-a-new-free-and-beginner-friendly-introductory-course-on-processing/42876 "2023-10-02T14:30:27Z")

</div>

Hello everyone, I’m thrilled to share an exciting new resource for our community. Dan @shiffman has just launched a free 5-hour long introductory course on Processing, tailored specifically for complete beginners. If yo…

---

## [Choosing random numbers that satisfy a certain condition](https://discourse.processing.org/t/choosing-random-numbers-that-satisfy-a-certain-condition/42468)

<div class="topic-metadata">

**Author:** [@i-draw-monkeys](https://discourse.processing.org/u/i-draw-monkeys)\
**Replies:** 19\
**Last updated:** [September 30, 2023, 2:36pm UTC](https://discourse.processing.org/t/choosing-random-numbers-that-satisfy-a-certain-condition/42468 "2023-09-30T14:36:47Z")

</div>

Let’s say I want to choose 4 random numbers, and I want these four numbers to all add to 100. Is there a way to code this? The way I think of is the “long” way which would be something like this, but is there a short w…

---

## [How do i convert array to ArrayList?](https://discourse.processing.org/t/how-do-i-convert-array-to-arraylist/42839)

<div class="topic-metadata">

**Author:** [@AniManOtaku](https://discourse.processing.org/u/AniManOtaku)\
**Replies:** 4\
**Last updated:** [September 26, 2023, 6:04pm UTC](https://discourse.processing.org/t/how-do-i-convert-array-to-arraylist/42839 "2023-09-26T18:04:04Z")

</div>

Please i need to know

---

## [Inconsistent result from calculation](https://discourse.processing.org/t/inconsistent-result-from-calculation/42755)

<div class="topic-metadata">

**Author:** [@RMurphy195](https://discourse.processing.org/u/RMurphy195)\
**Replies:** 7\
**Last updated:** [September 14, 2023, 7:07pm UTC](https://discourse.processing.org/t/inconsistent-result-from-calculation/42755 "2023-09-14T19:07:51Z")

</div>

In producing a clock (part of my learning curve) I couldn’t get the offset for the hour hand to work. I did solve the problem. I identified the cause as being a calculation that did not produce the expected result and, h…

---

## [Can't open Processing after downloading](https://discourse.processing.org/t/cant-open-processing-after-downloading/42750)

<div class="topic-metadata">

**Author:** [@Liz](https://discourse.processing.org/u/Liz)\
**Replies:** 7\
**Last updated:** [September 12, 2023, 7:58pm UTC](https://discourse.processing.org/t/cant-open-processing-after-downloading/42750 "2023-09-12T19:58:30Z")

</div>

When I try to open Processing after downloading, I get the message below: I’ve tried following the instructions in the screenshot, restarting my computer, and redownloading, but keep getting the same response. Using…

---

## [My experience with the video](https://discourse.processing.org/t/my-experience-with-the-video/32461)

<div class="topic-metadata">

**Author:** [@Lionel](https://discourse.processing.org/u/Lionel)\
**Replies:** 3\
**Last updated:** [September 5, 2023, 2:40pm UTC](https://discourse.processing.org/t/my-experience-with-the-video/32461 "2023-09-05T14:40:24Z")

</div>

I really enjoyed this tutorial. it taught me everything I needed to know and it was easy to follow

---

## [Is there an official Processing Discord?](https://discourse.processing.org/t/is-there-an-official-processing-discord/42631)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 4\
**Last updated:** [August 24, 2023, 8:45am UTC](https://discourse.processing.org/t/is-there-an-official-processing-discord/42631 "2023-08-24T08:45:12Z")

</div>

Is there a processing discord server?

---

## [Did I find a bug?](https://discourse.processing.org/t/did-i-find-a-bug/42645)

<div class="topic-metadata">

**Author:** [@adrinalino](https://discourse.processing.org/u/adrinalino)\
**Replies:** 3\
**Last updated:** [August 23, 2023, 9:46pm UTC](https://discourse.processing.org/t/did-i-find-a-bug/42645 "2023-08-23T21:46:45Z")

</div>

I was trying to work my way around the maximum size of an array (2147483647) when I came across this anomaly : void setup() { long i = 999\_999\_967L; println(int(i)); } results in : 1000000000 The value of the long…

---

## [Open Custom File with Processing?](https://discourse.processing.org/t/open-custom-file-with-processing/42637)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 1\
**Last updated:** [August 21, 2023, 10:54pm UTC](https://discourse.processing.org/t/open-custom-file-with-processing/42637 "2023-08-21T22:54:00Z")

</div>

Can i make a file called “file.banana” and programm processing to show it when choosing this dialog? and is it available on linux and windows? I want a way to klick the file, select open with BananaFileViewer or someth…

---

## [The field PApplet.keyEvent is deprecated?](https://discourse.processing.org/t/the-field-papplet-keyevent-is-deprecated/42603)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 3\
**Last updated:** [August 21, 2023, 3:44pm UTC](https://discourse.processing.org/t/the-field-papplet-keyevent-is-deprecated/42603 "2023-08-21T15:44:01Z")

</div>

Does anybody know what this means?

---

## [Console buffer length](https://discourse.processing.org/t/console-buffer-length/42308)

<div class="topic-metadata">

**Author:** [@hareti](https://discourse.processing.org/u/hareti)\
**Replies:** 3\
**Last updated:** [August 16, 2023, 11:43am UTC](https://discourse.processing.org/t/console-buffer-length/42308 "2023-08-16T11:43:11Z")

</div>

Hi, how do you increase the length of the console buffer ? Mine only stores about 500 lines and then they are lost. Can’t see anything in settings.

---

## [Is it possible to use the Java feature "record class" in Processing?](https://discourse.processing.org/t/is-it-possible-to-use-the-java-feature-record-class-in-processing/42591)

<div class="topic-metadata">

**Author:** [@nobkz](https://discourse.processing.org/u/nobkz)\
**Replies:** 3\
**Last updated:** [August 15, 2023, 4:27am UTC](https://discourse.processing.org/t/is-it-possible-to-use-the-java-feature-record-class-in-processing/42591 "2023-08-15T04:27:20Z")

</div>

I want to record class in Processing. (https://docs.oracle.com/en/java/javase/17/language/records.html#GUID-6699E26F-4A9B-4393-A08B-1E47D4B2D263) for example record Foo(double length, double width) { } But Processing…

---

## [How do I compile a Processing file to a JAR file?](https://discourse.processing.org/t/how-do-i-compile-a-processing-file-to-a-jar-file/42427)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 17\
**Last updated:** [August 7, 2023, 10:19am UTC](https://discourse.processing.org/t/how-do-i-compile-a-processing-file-to-a-jar-file/42427 "2023-08-07T10:19:20Z")

</div>

Lets just say i have this code: void setup() { size(960,540); background(255); fill(0); text("this works",width/2,height/2); } How can i make this code into a standalone jar file, that can be executed to just work. (i…

---

## [The purpose of the size parameter in createFont()](https://discourse.processing.org/t/the-purpose-of-the-size-parameter-in-createfont/42556)

<div class="topic-metadata">

**Author:** [@sterretje](https://discourse.processing.org/u/sterretje)\
**Replies:** 3\
**Last updated:** [August 5, 2023, 2:57pm UTC](https://discourse.processing.org/t/the-purpose-of-the-size-parameter-in-createfont/42556 "2023-08-05T14:57:17Z")

</div>

Good day I’m tying to figure out what the purpose is of the size parameter in the createFont() function? Is this just the default size that is used when drawing a text? Or is there more to it? Asking because I also can…

---

## [Overlay blendMode in Processing](https://discourse.processing.org/t/overlay-blendmode-in-processing/42467)

<div class="topic-metadata">

**Author:** [@stixan](https://discourse.processing.org/u/stixan)\
**Replies:** 7\
**Last updated:** [August 1, 2023, 2:35pm UTC](https://discourse.processing.org/t/overlay-blendmode-in-processing/42467 "2023-08-01T14:35:02Z")

</div>

I need to use OVERLAY in blendMode() for a project I’m working on. From reading the documentation I know that OVERLAY (as well as a number of other blend modes) is no longer supported. Yet, overlay is the blend mode I n…

---

## [Base class with protected method (I do not know a good topic title for this, sorry)](https://discourse.processing.org/t/base-class-with-protected-method-i-do-not-know-a-good-topic-title-for-this-sorry/42523)

<div class="topic-metadata">

**Author:** [@sterretje](https://discourse.processing.org/u/sterretje)\
**Replies:** 9\
**Last updated:** [August 1, 2023, 1:07pm UTC](https://discourse.processing.org/t/base-class-with-protected-method-i-do-not-know-a-good-topic-title-for-this-sorry/42523 "2023-08-01T13:07:42Z")

</div>

Good day, I have an abstract class from which I derive other classes. abstract class GuiControl { GuiControl(int x, int y, int w, int h, String text) { ... ... } ... ... /\* Test if mouse is over c…

---

## [Inspecting the max value of an element set by colormode (e.g. HSB Alpha) - possible?](https://discourse.processing.org/t/inspecting-the-max-value-of-an-element-set-by-colormode-e-g-hsb-alpha-possible/42512)

<div class="topic-metadata">

**Author:** [@MuddyGardener](https://discourse.processing.org/u/MuddyGardener)\
**Replies:** 12\
**Last updated:** [July 31, 2023, 1:04pm UTC](https://discourse.processing.org/t/inspecting-the-max-value-of-an-element-set-by-colormode-e-g-hsb-alpha-possible/42512 "2023-07-31T13:04:01Z")

</div>

Using colorMode() we can set the max for the range of the different values used to describe colours. Is there a way to recover this information in code via an expression? (I have searched for it, but haven’t found. …

---

## [Can you make the window title smaller?](https://discourse.processing.org/t/can-you-make-the-window-title-smaller/42511)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 2\
**Last updated:** [July 27, 2023, 10:17pm UTC](https://discourse.processing.org/t/can-you-make-the-window-title-smaller/42511 "2023-07-27T22:17:47Z")

</div>

Is it possible to make the window title thing smaller? Like this! So the title is thinner than a normal window!

---

## [Draw a PShape from a PShape array](https://discourse.processing.org/t/draw-a-pshape-from-a-pshape-array/42473)

<div class="topic-metadata">

**Author:** [@eliamedeot](https://discourse.processing.org/u/eliamedeot)\
**Replies:** 8\
**Last updated:** [July 27, 2023, 12:06pm UTC](https://discourse.processing.org/t/draw-a-pshape-from-a-pshape-array/42473 "2023-07-27T12:06:51Z")

</div>

Hello, I’m getting a “NullPointerException” trying to draw a PShape from an array of the same type. This is the code snippet: PShape s10, s15, s20, s25, s30, s35, s40, s45, s50; PShape\[\]\[\] grid = { {s50, s50, s50, s…

---

## [Wide shape is not drawn from corner, but tall shape is](https://discourse.processing.org/t/wide-shape-is-not-drawn-from-corner-but-tall-shape-is/42475)

<div class="topic-metadata">

**Author:** [@User442B](https://discourse.processing.org/u/User442B)\
**Replies:** 0\
**Last updated:** [July 22, 2023, 4:25pm UTC](https://discourse.processing.org/t/wide-shape-is-not-drawn-from-corner-but-tall-shape-is/42475 "2023-07-22T16:25:55Z")

</div>

color black = color(36,39,45); color green = color(141,187,110); PShape rec; void setup(){ size(1600,900,P2D); smooth(8); background(black); frameRate(60); rec = loadShape("wideRec.svg"); } void draw(){ …

---

## [Why does my code give NullPointerException error?](https://discourse.processing.org/t/why-does-my-code-give-nullpointerexception-error/42415)

<div class="topic-metadata">

**Author:** [@prathmesh](https://discourse.processing.org/u/prathmesh)\
**Replies:** 10\
**Last updated:** [July 18, 2023, 4:15am UTC](https://discourse.processing.org/t/why-does-my-code-give-nullpointerexception-error/42415 "2023-07-18T04:15:59Z")

</div>

Namaste all, Why does the floowing code give a null point exception error? Processing highlights the line where I have called the line function. This is a p5js code which I am trying to recreate in processing. Thanks. …

---

## [Loading 2D array of Strings in setup returns null](https://discourse.processing.org/t/loading-2d-array-of-strings-in-setup-returns-null/42434)

<div class="topic-metadata">

**Author:** [@Namrad](https://discourse.processing.org/u/Namrad)\
**Replies:** 3\
**Last updated:** [July 17, 2023, 10:11am UTC](https://discourse.processing.org/t/loading-2d-array-of-strings-in-setup-returns-null/42434 "2023-07-17T10:11:18Z")

</div>

Hello, I’m working on a sketch where at some point I want to load a 2D String array with randomly generated ‘words’ (which are randomly generated strings of chars). I want to pass these on to an Object and reference and…

---

## [Adding rounded corners to shapes (rectangle, triangle, etc.)](https://discourse.processing.org/t/adding-rounded-corners-to-shapes-rectangle-triangle-etc/42423)

<div class="topic-metadata">

**Author:** [@Janoer](https://discourse.processing.org/u/Janoer)\
**Replies:** 3\
**Last updated:** [July 15, 2023, 12:19pm UTC](https://discourse.processing.org/t/adding-rounded-corners-to-shapes-rectangle-triangle-etc/42423 "2023-07-15T12:19:31Z")

</div>

hello, is it possible if a shape like a rectangle, triangle etc is curved at each end like this?

---

## [Rounded Rectangles in P2D](https://discourse.processing.org/t/rounded-rectangles-in-p2d/42422)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 1\
**Last updated:** [July 15, 2023, 3:07am UTC](https://discourse.processing.org/t/rounded-rectangles-in-p2d/42422 "2023-07-15T03:07:17Z")

</div>

rounded rectangles in p2d are very weird, they arent how they are when used in javafx. void setup() { size(300,300,P2D); } void draw() { background(255); stroke(0); fill(255); rect(width/2-50,height/2-50,100,100,5); }

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

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