# Coding Questions

**URL:** https://discourse.processing.org/c/processing/processing-questions/15.md?page=182

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

**Page:** 183

---

## [Calculate layers of NEAT](https://discourse.processing.org/t/calculate-layers-of-neat/1763)

<div class="topic-metadata">

**Author:** [@Nath7009](https://discourse.processing.org/u/Nath7009)\
**Replies:** 1\
**Last updated:** [July 14, 2018, 8:48pm UTC](https://discourse.processing.org/t/calculate-layers-of-neat/1763 "2018-07-14T20:48:08Z")

</div>

Hi, I’m trying to do my own implementation of a NEAT using processing, to be able to show my neural network, I have to order the different nodes in layers. The problem is that when I add a new node in the network, the l…

---

## [Trying to Register pressing ALT outside of the application window](https://discourse.processing.org/t/trying-to-register-pressing-alt-outside-of-the-application-window/1758)

<div class="topic-metadata">

**Author:** [@Thealonic](https://discourse.processing.org/u/Thealonic)\
**Replies:** 0\
**Last updated:** [July 14, 2018, 8:51am UTC](https://discourse.processing.org/t/trying-to-register-pressing-alt-outside-of-the-application-window/1758 "2018-07-14T08:51:37Z")

</div>

Currently trying to make a over complicated software to run alongside other software and I’m currrently trying to get something to register colour changes in pixels while holding down a key. However, after trying to figu…

---

## [Earth to move in it's orbit](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379)

<div class="topic-metadata">

**Author:** [@akash](https://discourse.processing.org/u/akash)\
**Replies:** 9\
**Last updated:** [July 14, 2018, 4:24pm UTC](https://discourse.processing.org/t/earth-to-move-in-its-orbit/1379 "2018-07-14T16:24:01Z")

</div>

I have two ellipse. one is larger ellipse and another is smaller ellipse. i want smaller ellipse to follow the path of the larger ellipse. Your suggestions are needed?. ( i am a beginner).

---

## [Problems with width from class within class](https://discourse.processing.org/t/problems-with-width-from-class-within-class/1742)

<div class="topic-metadata">

**Author:** [@sensn](https://discourse.processing.org/u/sensn)\
**Replies:** 3\
**Last updated:** [July 13, 2018, 5:03pm UTC](https://discourse.processing.org/t/problems-with-width-from-class-within-class/1742 "2018-07-13T17:03:15Z")

</div>

Hello, I’m having problems with getting the correct value for screenwidth using width from a class within a class. I modified the example code that I found on this forum to illustrate the problem. If i call width from …

---

## [NeuralNetwork copied in Java from 10.6](https://discourse.processing.org/t/neuralnetwork-copied-in-java-from-10-6/1666)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 4\
**Last updated:** [July 12, 2018, 8:20am UTC](https://discourse.processing.org/t/neuralnetwork-copied-in-java-from-10-6/1666 "2018-07-12T08:20:43Z")

</div>

I’m using Java & Processing Hey I’m trying to follow 10.6: Neural Networks: Matrix Math Part 1 - The Nature of Code, but got stuck where he makes each matrix\[i\] its own array. I couldnt figure out if in java it be float…

---

## [Undo Function for my Tool](https://discourse.processing.org/t/undo-function-for-my-tool/1618)

<div class="topic-metadata">

**Author:** [@MxFxM](https://discourse.processing.org/u/MxFxM)\
**Replies:** 6\
**Last updated:** [July 12, 2018, 12:42pm UTC](https://discourse.processing.org/t/undo-function-for-my-tool/1618 "2018-07-12T12:42:37Z")

</div>

Hi, at the moment I’m working on a tool to visualize data. The tool is able to save and restore the data when you click the “Save” button. But that function only saves the then prepared and calculated data, not all the …

---

## [keyCode repeats forever](https://discourse.processing.org/t/keycode-repeats-forever/1693)

<div class="topic-metadata">

**Author:** [@NinjaKili](https://discourse.processing.org/u/NinjaKili)\
**Replies:** 1\
**Last updated:** [July 11, 2018, 5:05pm UTC](https://discourse.processing.org/t/keycode-repeats-forever/1693 "2018-07-11T17:05:33Z")

</div>

float brush\_x = 10; float brush\_y = 10; void setup() { size(800,800); background(0); rectMode(CENTER); frameRate(300); } void draw() { if(mousePressed == true) { noStroke(); ellipse(mouseX,mouseY,brush\_x,brush…

---

## [Dividing up PImage](https://discourse.processing.org/t/dividing-up-pimage/1664)

<div class="topic-metadata">

**Author:** [@Trilobyte](https://discourse.processing.org/u/Trilobyte)\
**Replies:** 3\
**Last updated:** [July 11, 2018, 2:46pm UTC](https://discourse.processing.org/t/dividing-up-pimage/1664 "2018-07-11T14:46:00Z")

</div>

Hello all! I have a question/problem regarding PImages. I am working on a project that converts MIDI text files into images, concatenates those images into one large image, and then divides that long image into 8888 pix…

---

## [How to get the sketchPath from a static method](https://discourse.processing.org/t/how-to-get-the-sketchpath-from-a-static-method/1617)

<div class="topic-metadata">

**Author:** [@Manuel](https://discourse.processing.org/u/Manuel)\
**Replies:** 10\
**Last updated:** [July 11, 2018, 12:57pm UTC](https://discourse.processing.org/t/how-to-get-the-sketchpath-from-a-static-method/1617 "2018-07-11T12:57:55Z")

</div>

Hi, I’ve tried everything I could think of to try to load a file inside an enum, but can’t get a way to reference to the current sketchPath statically. Does anyone know any posible solution? That’s a small part of the c…

---

## [Alarm Clock in Processing](https://discourse.processing.org/t/alarm-clock-in-processing/1631)

<div class="topic-metadata">

**Author:** [@LaLe](https://discourse.processing.org/u/LaLe)\
**Replies:** 6\
**Last updated:** [July 11, 2018, 12:52pm UTC](https://discourse.processing.org/t/alarm-clock-in-processing/1631 "2018-07-11T12:52:46Z")

</div>

Hello everyone, I am trying to code an alarm clock using Processing. I am pretty new so I am still learning… I already achieved to code a Clock using real time. But I am not sure how I can make a text input field, so yo…

---

## [Using class-wide methods in non-static classes](https://discourse.processing.org/t/using-class-wide-methods-in-non-static-classes/1677)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.processing.org/u/Jake)\
**Replies:** 3\
**Last updated:** [July 11, 2018, 12:03pm UTC](https://discourse.processing.org/t/using-class-wide-methods-in-non-static-classes/1677 "2018-07-11T12:03:12Z")

</div>

After doing some research, I have yet to find a way to use static methods in a non-static class. Alternatively, I can’t create instances of an object of a static class. I did notice someone mention class-wide methods, bu…

---

## [Using Loops to Make Objects. Help!](https://discourse.processing.org/t/using-loops-to-make-objects-help/1621)

<div class="topic-metadata">

**Author:** [@QuazArxx](https://discourse.processing.org/u/QuazArxx)\
**Replies:** 13\
**Last updated:** [July 11, 2018, 6:45am UTC](https://discourse.processing.org/t/using-loops-to-make-objects-help/1621 "2018-07-11T06:45:05Z")

</div>

So i’m back here again. I’m trying to figure out: is it possible to use let’s say a for loop to draw an object 3 times and be able to control them individually still? What I’m trying to do is make the object appear 3 ti…

---

## [File to code TCG](https://discourse.processing.org/t/file-to-code-tcg/1345)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 4\
**Last updated:** [July 10, 2018, 10:49pm UTC](https://discourse.processing.org/t/file-to-code-tcg/1345 "2018-07-10T22:49:55Z")

</div>

I’m wanting to make a list like name type attack defense and so on in text then get the program to grab the stuff from the list & use the correct info when the card is summoned. I’m thinking of making a TCG & I dont…

---

## [ArrayList Problems / get() & remove()](https://discourse.processing.org/t/arraylist-problems-get-remove/1150)

<div class="topic-metadata">

**Author:** [@RC75018](https://discourse.processing.org/u/RC75018)\
**Replies:** 8\
**Last updated:** [July 10, 2018, 10:20am UTC](https://discourse.processing.org/t/arraylist-problems-get-remove/1150 "2018-07-10T10:20:06Z")

</div>

Hi everyone, I am a newbie in processing, at my early stages of learning and playing with this amazing language. I am trying to create a kind of “space invader” program from scratch. I don’t want to get inspired by the…

---

## [Sequencer firing multiple events/ or one step behind](https://discourse.processing.org/t/sequencer-firing-multiple-events-or-one-step-behind/1571)

<div class="topic-metadata">

**Author:** [@sensn](https://discourse.processing.org/u/sensn)\
**Replies:** 20\
**Last updated:** [July 10, 2018, 8:29am UTC](https://discourse.processing.org/t/sequencer-firing-multiple-events-or-one-step-behind/1571 "2018-07-10T08:29:47Z")

</div>

I have some code for a 16 step sequencer but I’m having problems with triggering the events. I’ll post 2 versions of the code. In the first version the problem is that the event is triggert multiple times but it should …

---

## [DomeProjection example low quality](https://discourse.processing.org/t/domeprojection-example-low-quality/1519)

<div class="topic-metadata">

**Author:** [@ngd](https://discourse.processing.org/u/ngd)\
**Replies:** 4\
**Last updated:** [July 9, 2018, 7:06pm UTC](https://discourse.processing.org/t/domeprojection-example-low-quality/1519 "2018-07-09T19:06:01Z")

</div>

Hello dear processing friends, Ive bee experimenting with the DomeProjection example from the processing examples Somehow the render/output quality is relatively low compared to other sketches. I ve tried to increa…

---

## [Is there mouse locking in processing?](https://discourse.processing.org/t/is-there-mouse-locking-in-processing/1633)

<div class="topic-metadata">

**Author:** [@codingking03](https://discourse.processing.org/u/codingking03)\
**Replies:** 5\
**Last updated:** [July 9, 2018, 5:00pm UTC](https://discourse.processing.org/t/is-there-mouse-locking-in-processing/1633 "2018-07-09T17:00:25Z")

</div>

Is there a way to not necessarily lock the mouse in the middle of the screen, but rather make sure that it stays within a small box in the middle and when it hits the edge will just go on the other side? And of course it…

---

## [Can't use variable in draw()](https://discourse.processing.org/t/cant-use-variable-in-draw/1619)

<div class="topic-metadata">

**Author:** [@Daniel](https://discourse.processing.org/u/Daniel)\
**Replies:** 3\
**Last updated:** [July 9, 2018, 2:24pm UTC](https://discourse.processing.org/t/cant-use-variable-in-draw/1619 "2018-07-09T14:24:10Z")

</div>

Hi Folks, I’m learning processing and I can’t see the forest for the trees… Why can’t I use the variable “temp” in draw(): String temp; public void setup() { cp5.addButton(“plz0”) .setValue(0) .setPosition(100,100…

---

## [Program stops working once 2-d array is full](https://discourse.processing.org/t/program-stops-working-once-2-d-array-is-full/846)

<div class="topic-metadata">

**Author:** [@Wnz](https://discourse.processing.org/u/Wnz)\
**Replies:** 2\
**Last updated:** [July 9, 2018, 2:18pm UTC](https://discourse.processing.org/t/program-stops-working-once-2-d-array-is-full/846 "2018-07-09T14:18:29Z")

</div>

I am making a 2048 game without the use of classes. One of my most major problems is that once the array is full with values, the program stops working. I tried creating a Boolean to change screens before the array is fu…

---

## [Multiple Windows: How to close/exit only one or get it to only create one](https://discourse.processing.org/t/multiple-windows-how-to-close-exit-only-one-or-get-it-to-only-create-one/1611)

<div class="topic-metadata">

**Author:** [@jbrod](https://discourse.processing.org/u/jbrod)\
**Replies:** 2\
**Last updated:** [July 9, 2018, 7:17am UTC](https://discourse.processing.org/t/multiple-windows-how-to-close-exit-only-one-or-get-it-to-only-create-one/1611 "2018-07-09T07:17:16Z")

</div>

Hello! I am currently trying to create my own version of paint. I want my menus to be popup windows. I have two separate windows created for the two different menus. The problem I currently have is that 1) I don’t know h…

---

## [Closing a running application on PC](https://discourse.processing.org/t/closing-a-running-application-on-pc/1590)

<div class="topic-metadata">

**Author:** [@Lucifer](https://discourse.processing.org/u/Lucifer)\
**Replies:** 2\
**Last updated:** [July 9, 2018, 5:29am UTC](https://discourse.processing.org/t/closing-a-running-application-on-pc/1590 "2018-07-09T05:29:55Z")

</div>

After I launch a exe app using lauch(); how do i close it?? Please help

---

## [Deeply-layered nested classes](https://discourse.processing.org/t/deeply-layered-nested-classes/805)

<div class="topic-metadata">

**Author:** [@FurryNightShade](https://discourse.processing.org/u/FurryNightShade)\
**Replies:** 12\
**Last updated:** [July 9, 2018, 5:19am UTC](https://discourse.processing.org/t/deeply-layered-nested-classes/805 "2018-07-09T05:19:04Z")

</div>

Hello. I’m trying to make nested classes to make some sort of system in my classes. I am working insode Visual Studio Code, where you can hide lines of code. When I try: static class A{ static class B{ cla…

---

## [Creating a function that will calculate the equation of a line in 3D space](https://discourse.processing.org/t/creating-a-function-that-will-calculate-the-equation-of-a-line-in-3d-space/1597)

<div class="topic-metadata">

**Author:** [@Scott06](https://discourse.processing.org/u/Scott06)\
**Replies:** 3\
**Last updated:** [July 9, 2018, 12:58am UTC](https://discourse.processing.org/t/creating-a-function-that-will-calculate-the-equation-of-a-line-in-3d-space/1597 "2018-07-09T00:58:09Z")

</div>

Hi, I am in need of some help. I am currently writing a program that will take a camera position and a point in space and project that point onto a 2D image plane. One function that I need to create is to create a functi…

---

## [How can extract an mp3 file's icon image?](https://discourse.processing.org/t/how-can-extract-an-mp3-files-icon-image/1573)

<div class="topic-metadata">

**Author:** [@KAZ](https://discourse.processing.org/u/KAZ)\
**Replies:** 3\
**Last updated:** [July 7, 2018, 6:57pm UTC](https://discourse.processing.org/t/how-can-extract-an-mp3-files-icon-image/1573 "2018-07-07T18:57:56Z")

</div>

How can extract an mp3 file’s icon image?

---

## [StringList Manipulation](https://discourse.processing.org/t/stringlist-manipulation/1561)

<div class="topic-metadata">

**Author:** [@poltergeister](https://discourse.processing.org/u/poltergeister)\
**Replies:** 3\
**Last updated:** [July 7, 2018, 11:44pm UTC](https://discourse.processing.org/t/stringlist-manipulation/1561 "2018-07-07T23:44:48Z")

</div>

I’m trying to manipulate the contents of a StringList for use in one place in the code while leaving the original list intact. I’m finding this doesn’t work. I’m guessing that the StringList is being maintained by ‘refer…

---

## [Millis() doubt: how to do the program wait two seconds before doing anything?](https://discourse.processing.org/t/millis-doubt-how-to-do-the-program-wait-two-seconds-before-doing-anything/1579)

<div class="topic-metadata">

**Author:** [@parzival](https://discourse.processing.org/u/parzival)\
**Replies:** 2\
**Last updated:** [July 7, 2018, 4:50pm UTC](https://discourse.processing.org/t/millis-doubt-how-to-do-the-program-wait-two-seconds-before-doing-anything/1579 "2018-07-07T16:50:35Z")

</div>

Hello. I’m new here and I’m trying to make the program wait two seconds before doing anything, but I do not know exactly how to do it. For example, how can I draw a rectangle, then wait two seconds and draw another one, …

---

## [Java: Processing can't run multiple key inputs simultaneously](https://discourse.processing.org/t/java-processing-cant-run-multiple-key-inputs-simultaneously/1575)

<div class="topic-metadata">

**Author:** [@Brian](https://discourse.processing.org/u/Brian)\
**Replies:** 4\
**Last updated:** [July 7, 2018, 4:43pm UTC](https://discourse.processing.org/t/java-processing-cant-run-multiple-key-inputs-simultaneously/1575 "2018-07-07T16:43:17Z")

</div>

I’m making a 2-player Ping pong game. I tried moving 1 player at a time, it worked fine but when I held down the move buttons of both at once, one moved flawlessly but the other moved just a bit then it got stuck. final…

---

## [\[SOLVED\] Minim progress bar](https://discourse.processing.org/t/solved-minim-progress-bar/1551)

<div class="topic-metadata">

**Author:** [@DogeMastr](https://discourse.processing.org/u/DogeMastr)\
**Replies:** 16\
**Last updated:** [July 7, 2018, 3:24pm UTC](https://discourse.processing.org/t/solved-minim-progress-bar/1551 "2018-07-07T15:24:41Z")

</div>

I’m trying to make a music player using minim and I have a progress bar thats halfway down the screen, the way I intend it to work is when you click on the progress bar the song will skip to that part, I know something i…

---

## [Adding a background image to a code](https://discourse.processing.org/t/adding-a-background-image-to-a-code/1533)

<div class="topic-metadata">

**Author:** [@Theothecat](https://discourse.processing.org/u/Theothecat)\
**Replies:** 4\
**Last updated:** [July 7, 2018, 12:11pm UTC](https://discourse.processing.org/t/adding-a-background-image-to-a-code/1533 "2018-07-07T12:11:17Z")

</div>

I’m new to proccesing, I have a code that I made, and I’m wondering how to set the background to a image, all the attempts that I did failed.

---

## [Creating a new table java Processing](https://discourse.processing.org/t/creating-a-new-table-java-processing/1555)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 1\
**Last updated:** [July 6, 2018, 11:29pm UTC](https://discourse.processing.org/t/creating-a-new-table-java-processing/1555 "2018-07-06T23:29:08Z")

</div>

OK, I’m looking into files making, loading & such & tried to make a program that tries to find a file. I don’t yet have made & if it dont have it creates one. I got to where it says there no file, but I’m having trouble …

[Previous page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=181)

[Next page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=183)
