# Beginners

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

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

**Page:** 6

---

## [Serialization in P4](https://discourse.processing.org/t/serialization-in-p4/42420)

<div class="topic-metadata">

**Author:** [@marek](https://discourse.processing.org/u/marek)\
**Replies:** 7\
**Last updated:** [July 14, 2023, 10:27pm UTC](https://discourse.processing.org/t/serialization-in-p4/42420 "2023-07-14T22:27:37Z")

</div>

I’m trying to use java object serialization in P4 and have a problem. I have a class which implements Serializable, but I get an error on execution of “NotSerializable”. I read somewhere (here?) that a serializable class…

---

## [How do I use Processing code in a different IDE?](https://discourse.processing.org/t/how-do-i-use-processing-code-in-a-different-ide/42403)

<div class="topic-metadata">

**Author:** [@Joseph](https://discourse.processing.org/u/Joseph)\
**Replies:** 7\
**Last updated:** [July 12, 2023, 3:33pm UTC](https://discourse.processing.org/t/how-do-i-use-processing-code-in-a-different-ide/42403 "2023-07-12T15:33:34Z")

</div>

Processing is my first code editor and it was great when I was making small projects, but the more time I put into a project the more I realize I spend most of my time trying to find a single method in my code. So I thin…

---

## [How do I make an array larger?](https://discourse.processing.org/t/how-do-i-make-an-array-larger/42361)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 1\
**Last updated:** [July 6, 2023, 11:46pm UTC](https://discourse.processing.org/t/how-do-i-make-an-array-larger/42361 "2023-07-06T23:46:08Z")

</div>

I am trying to make a array, that if you get to the end, it gets one larger. this is my code: String\[\] text = new String\[32\]; int scroll; int visScroll; float scrollSpeed; int lineHeight = 24; void setup() { size(…

---

## [How to use void sum](https://discourse.processing.org/t/how-to-use-void-sum/42321)

<div class="topic-metadata">

**Author:** [@Janoer](https://discourse.processing.org/u/Janoer)\
**Replies:** 4\
**Last updated:** [July 1, 2023, 11:54am UTC](https://discourse.processing.org/t/how-to-use-void-sum/42321 "2023-07-01T11:54:49Z")

</div>

Hello, I want to use sum but I don’t know where to put number. is there anything that can help? Thank You! void sum(int a, int b, int c) { in total = a + b + c; printIn(total); }

---

## [Can't see display window on screen unless I have it in fullScreen()](https://discourse.processing.org/t/cant-see-display-window-on-screen-unless-i-have-it-in-fullscreen/42311)

<div class="topic-metadata">

**Author:** [@scottreinhard](https://discourse.processing.org/u/scottreinhard)\
**Replies:** 1\
**Last updated:** [June 29, 2023, 2:58pm UTC](https://discourse.processing.org/t/cant-see-display-window-on-screen-unless-i-have-it-in-fullscreen/42311 "2023-06-29T14:58:23Z")

</div>

I’ve come back to some code after awhile away from it. It had been working up until now. But now when I run it, it shows that it is running but I cannot see it on my screen, I have a println(frameCount) to confirm that i…

---

## [P3D make something display on top!](https://discourse.processing.org/t/p3d-make-something-display-on-top/42302)

<div class="topic-metadata">

**Author:** [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)\
**Replies:** 2\
**Last updated:** [June 28, 2023, 9:36pm UTC](https://discourse.processing.org/t/p3d-make-something-display-on-top/42302 "2023-06-28T21:36:39Z")

</div>

How do i display gui in p3d always in front of everthing? if i try to do it like this: box(256); popMatrix(); camera(); //resets viewport to 2D equivalent noLights(); fill(60); rect(0,0,100,100); fill(2…

---

## [What does "Error on int" mean?](https://discourse.processing.org/t/what-does-error-on-int-mean/42264)

<div class="topic-metadata">

**Author:** [@Random\_Ghost](https://discourse.processing.org/u/Random_Ghost)\
**Replies:** 11\
**Last updated:** [June 24, 2023, 6:11pm UTC](https://discourse.processing.org/t/what-does-error-on-int-mean/42264 "2023-06-24T18:11:43Z")

</div>

''Syntax error on token “int”, invalid ClassType ‘’ I have a static class C3 and I’m trying to create a color method in it. Here’s the code, static class C3 { int r, g, b; /\* public C3(color c){ r = c; g…

---

## [How do I write class methods in other tabs?](https://discourse.processing.org/t/how-do-i-write-class-methods-in-other-tabs/42292)

<div class="topic-metadata">

**Author:** [@Random\_Ghost](https://discourse.processing.org/u/Random_Ghost)\
**Replies:** 2\
**Last updated:** [June 25, 2023, 5:45pm UTC](https://discourse.processing.org/t/how-do-i-write-class-methods-in-other-tabs/42292 "2023-06-25T17:45:45Z")

</div>

I am creating an image processing methid but it’s becoming too long for me to keep track of everything. Is it possible for me to write the class methods in other tabs?

---

## [Data structure: table vs. \<class\>ArrayList](https://discourse.processing.org/t/data-structure-table-vs-class-arraylist/42239)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 2\
**Last updated:** [June 18, 2023, 9:26am UTC](https://discourse.processing.org/t/data-structure-table-vs-class-arraylist/42239 "2023-06-18T09:26:12Z")

</div>

Hello all, I am working on a vocabulary test Sketch and I load a csv file with word pairs. I work with the table then when presenting the words in the test. But the table feels clumsy here. Would it be easier to pars…

---

## [Processing 4.2 cannot find a class or type named "JASONArray"](https://discourse.processing.org/t/processing-4-2-cannot-find-a-class-or-type-named-jasonarray/42180)

<div class="topic-metadata">

**Author:** [@Grumpy\_Mike](https://discourse.processing.org/u/Grumpy_Mike)\
**Replies:** 3\
**Last updated:** [June 14, 2023, 9:07pm UTC](https://discourse.processing.org/t/processing-4-2-cannot-find-a-class-or-type-named-jasonarray/42180 "2023-06-14T21:07:40Z")

</div>

I am trying to write a JASON file in Processing 4.2. I am trying to follow the examples in the documentation. But when I include the command JASONArray values I get the error message cannot find a class or type named …

---

## [Input window appears behind sketch](https://discourse.processing.org/t/input-window-appears-behind-sketch/24432)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 2\
**Last updated:** [June 14, 2023, 6:07pm UTC](https://discourse.processing.org/t/input-window-appears-behind-sketch/24432 "2023-06-14T18:07:18Z")

</div>

When I use selectInput() the window always appears behind the screen. Is there any way to fix this, I’ve seen that this has been flagged before on the github and supposedly was fixed but I still have the problem. Is ther…

---

## [How do I make the background transparent](https://discourse.processing.org/t/how-do-i-make-the-background-transparent/42187)

<div class="topic-metadata">

**Author:** [@Worm](https://discourse.processing.org/u/Worm)\
**Replies:** 3\
**Last updated:** [June 11, 2023, 7:30pm UTC](https://discourse.processing.org/t/how-do-i-make-the-background-transparent/42187 "2023-06-11T19:30:18Z")

</div>

I’m very new so maybe this is super obvious So I’m trying to set the background to transparent so I can export my images and use them as sprites in unity. When I’m using SaveFrame() it saves the frames as .PNG and I kno…

---

## [Processing : Why transform coordinate system, not individual elements?](https://discourse.processing.org/t/processing-why-transform-coordinate-system-not-individual-elements/42167)

<div class="topic-metadata">

**Author:** [@skraboutcha](https://discourse.processing.org/u/skraboutcha)\
**Replies:** 11\
**Last updated:** [June 11, 2023, 6:21pm UTC](https://discourse.processing.org/t/processing-why-transform-coordinate-system-not-individual-elements/42167 "2023-06-11T18:21:12Z")

</div>

Hello dear Processing Community, I’m trying to understand the advantage of the transformation mode (position, scale, rotation) offered by Processing (and p5) I’m having trouble getting to grips with the fact that I hav…

---

## [Class for colours](https://discourse.processing.org/t/class-for-colours/42169)

<div class="topic-metadata">

**Author:** [@sterretje](https://discourse.processing.org/u/sterretje)\
**Replies:** 18\
**Last updated:** [June 10, 2023, 3:35pm UTC](https://discourse.processing.org/t/class-for-colours/42169 "2023-06-10T15:35:07Z")

</div>

Good day I’m trying to create a class that contains the colours for my application. E.g. class Colours { color background = color (0xB0, 0xB0, 0xB0); color text = color( 0x00, 0x00, 0x00); } And I would like to us…

---

## [Why can't I create my class after I declare a variable with it?](https://discourse.processing.org/t/why-cant-i-create-my-class-after-i-declare-a-variable-with-it/41884)

<div class="topic-metadata">

**Author:** [@Hha2011](https://discourse.processing.org/u/Hha2011)\
**Replies:** 12\
**Last updated:** [June 9, 2023, 5:43pm UTC](https://discourse.processing.org/t/why-cant-i-create-my-class-after-i-declare-a-variable-with-it/41884 "2023-06-09T17:43:10Z")

</div>

\< Ball ball; class Ball { } I swear this code worked in processing 4.1.1 or maybe 4.0b7 cause that was how the tutorial worked(well the class is in a different file but processing reads it like tht so it does not …

---

## [Processing Java file into HTML](https://discourse.processing.org/t/processing-java-file-into-html/42123)

<div class="topic-metadata">

**Author:** [@rrnn](https://discourse.processing.org/u/rrnn)\
**Replies:** 2\
**Last updated:** [June 3, 2023, 4:41am UTC](https://discourse.processing.org/t/processing-java-file-into-html/42123 "2023-06-03T04:41:43Z")

</div>

Hello, a very noob question, forgive me :grin: but is it possible to use a sketch made with Java in Processing app into a html page? If yes, how? is there some tutorial?

---

## [Looking for a date function that can calculate the day of the year from a given date](https://discourse.processing.org/t/looking-for-a-date-function-that-can-calculate-the-day-of-the-year-from-a-given-date/42125)

<div class="topic-metadata">

**Author:** [@proc8888](https://discourse.processing.org/u/proc8888)\
**Replies:** 2\
**Last updated:** [June 3, 2023, 1:03am UTC](https://discourse.processing.org/t/looking-for-a-date-function-that-can-calculate-the-day-of-the-year-from-a-given-date/42125 "2023-06-03T01:03:05Z")

</div>

I am looking for a date function that can calculate the day of the year from a given date (YYYYMMDD) eg. 20230603 Thanks for help/tips with coding.

---

## [Despite color mode being on 255, it only allows to go to 230!](https://discourse.processing.org/t/despite-color-mode-being-on-255-it-only-allows-to-go-to-230/42096)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 2\
**Last updated:** [June 3, 2023, 12:45am UTC](https://discourse.processing.org/t/despite-color-mode-being-on-255-it-only-allows-to-go-to-230/42096 "2023-06-03T00:45:32Z")

</div>

In my Project color mode is set to HSB 255. but if i use “red(color)” it goes up only to 230. i figured out i made an error with my sliders. im sorry

---

## [How can I make a star?](https://discourse.processing.org/t/how-can-i-make-a-star/42100)

<div class="topic-metadata">

**Author:** [@minsu1995](https://discourse.processing.org/u/minsu1995)\
**Replies:** 5\
**Last updated:** [May 30, 2023, 12:26am UTC](https://discourse.processing.org/t/how-can-i-make-a-star/42100 "2023-05-30T00:26:14Z")

</div>

i’m very new to coding (started 3 days ago) and am wondering what variables i would need to consider when making a star. however, i’m not animating yet, so i’m not very familiar with the void setup things. any help appre…

---

## [Moving shape with rotate](https://discourse.processing.org/t/moving-shape-with-rotate/42071)

<div class="topic-metadata">

**Author:** [@Janoer](https://discourse.processing.org/u/Janoer)\
**Replies:** 10\
**Last updated:** [May 27, 2023, 12:01am UTC](https://discourse.processing.org/t/moving-shape-with-rotate/42071 "2023-05-27T00:01:06Z")

</div>

hello, I’m new at this. can a rotating shape be moved with mouseX and mouseY?

---

## [Function changes an array it shouldn't interact with at all](https://discourse.processing.org/t/function-changes-an-array-it-shouldnt-interact-with-at-all/42004)

<div class="topic-metadata">

**Author:** [@Lednev](https://discourse.processing.org/u/Lednev)\
**Replies:** 9\
**Last updated:** [May 16, 2023, 1:17am UTC](https://discourse.processing.org/t/function-changes-an-array-it-shouldnt-interact-with-at-all/42004 "2023-05-16T01:17:50Z")

</div>

With th line marked with many “#” active i get this: With it inactive i get this: This line and the line above it changes the p1 array somehow, even though it shouln’t, as far as i understand. What am i missing…

---

## [PGraphics beginDraw() performance](https://discourse.processing.org/t/pgraphics-begindraw-performance/41929)

<div class="topic-metadata">

**Author:** [@Morzsamx](https://discourse.processing.org/u/Morzsamx)\
**Replies:** 4\
**Last updated:** [May 7, 2023, 3:55pm UTC](https://discourse.processing.org/t/pgraphics-begindraw-performance/41929 "2023-05-07T15:55:13Z")

</div>

Hello, My workplace uses a 3d application built on processing 4.2. I had no issues before, but trying to run it on my new laptop I got terrible performance, so I tried to have a look at the code and found that the begin…

---

## [Updating after a some time on all frameCounts?](https://discourse.processing.org/t/updating-after-a-some-time-on-all-framecounts/41935)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 1\
**Last updated:** [May 7, 2023, 1:00pm UTC](https://discourse.processing.org/t/updating-after-a-some-time-on-all-framecounts/41935 "2023-05-07T13:00:53Z")

</div>

Is this code fine for every frame count? it doesntned to be super accurate void updateInterval() { updatingIntervalCounter++; updateNow = false; if (updatingIntervalCounter \> frameRate/8) { updatingIntervalCou…

---

## [Why my function accept a Primitive Type?](https://discourse.processing.org/t/why-my-function-accept-a-primitive-type/41902)

<div class="topic-metadata">

**Author:** [@Stanlepunk](https://discourse.processing.org/u/Stanlepunk)\
**Replies:** 4\
**Last updated:** [May 3, 2023, 8:00pm UTC](https://discourse.processing.org/t/why-my-function-accept-a-primitive-type/41902 "2023-05-03T20:00:56Z")

</div>

I wrote this code, and strangely it’s work in Processing for an unknown reason. void setup() { int \[\] arr = {0,1,2,3}; // that's work, but normaly must fail // Integer \[\] arr = {0,1,2,3}; // this one work but it's n…

---

## [Hitbox detection?](https://discourse.processing.org/t/hitbox-detection/41871)

<div class="topic-metadata">

**Author:** [@Aryszin](https://discourse.processing.org/u/Aryszin)\
**Replies:** 9\
**Last updated:** [May 3, 2023, 4:23pm UTC](https://discourse.processing.org/t/hitbox-detection/41871 "2023-05-03T16:23:17Z")

</div>

the terrain is a 2d array, and thre player can move just a tiny but so how do i do it? i dont wanna use a pgraphics with get()

---

## [Max value millis()](https://discourse.processing.org/t/max-value-millis/41887)

<div class="topic-metadata">

**Author:** [@Christian](https://discourse.processing.org/u/Christian)\
**Replies:** 2\
**Last updated:** [May 2, 2023, 6:29pm UTC](https://discourse.processing.org/t/max-value-millis/41887 "2023-05-02T18:29:18Z")

</div>

Hello! I’m wondering what the maximum value of millis() is?

---

## [How can i make an ellipse with vertical lines coming out of its upper circumference towards the top of the page?](https://discourse.processing.org/t/how-can-i-make-an-ellipse-with-vertical-lines-coming-out-of-its-upper-circumference-towards-the-top-of-the-page/39839)

<div class="topic-metadata">

**Author:** [@chaotic.rabbit](https://discourse.processing.org/u/chaotic.rabbit)\
**Replies:** 3\
**Last updated:** [May 2, 2023, 5:13pm UTC](https://discourse.processing.org/t/how-can-i-make-an-ellipse-with-vertical-lines-coming-out-of-its-upper-circumference-towards-the-top-of-the-page/39839 "2023-05-02T17:13:55Z")

</div>

i want to make 5 lines to come out of the top part of the ellipse and touch the top of the page

---

## [How to make a new folder on HD](https://discourse.processing.org/t/how-to-make-a-new-folder-on-hd/41864)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 6\
**Last updated:** [April 29, 2023, 1:46pm UTC](https://discourse.processing.org/t/how-to-make-a-new-folder-on-hd/41864 "2023-04-29T13:46:06Z")

</div>

Hello all, small question here. How can i make a new folder on HD? Tried File f1=new File(""); if ( f1.mkDir ( sketchPath("")+"//"+"c1" ) ) { // } or File f1=new File(sketchPath("")+"//"+"c1"); if (f…

---

## [Mouse lagging and can't make fullScreen() in 4K](https://discourse.processing.org/t/mouse-lagging-and-cant-make-fullscreen-in-4k/41753)

<div class="topic-metadata">

**Author:** [@doesThisReallyMatter](https://discourse.processing.org/u/doesThisReallyMatter)\
**Replies:** 2\
**Last updated:** [April 18, 2023, 12:42pm UTC](https://discourse.processing.org/t/mouse-lagging-and-cant-make-fullscreen-in-4k/41753 "2023-04-18T12:42:24Z")

</div>

void setup(){ fullScreen(); noCursor(); } void draw(){ background(#f097ff); drawCursor(mouseX,mouseY); text("("+mouseX+","+mouseY+")",width/2,height/2); } void drawCursor(float x,float y){ final float W = w…

---

## [Multiple classes in an (undefined) ArrayList?](https://discourse.processing.org/t/multiple-classes-in-an-undefined-arraylist/8291)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 21\
**Last updated:** [April 18, 2023, 9:47am UTC](https://discourse.processing.org/t/multiple-classes-in-an-undefined-arraylist/8291 "2023-04-18T09:47:34Z")

</div>

Hi! So a while ago I realised you could make ArrayLists with no class associated. ArrayList sampleList = new ArrayList(); I am working on a simple 2d platformer at the moment and created a class that contains the grav…

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

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