# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=310

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

**Page:** 311

---

## [Find width and height of the text drawn with text()](https://discourse.processing.org/t/find-width-and-height-of-the-text-drawn-with-text/9804)

<div class="topic-metadata">

**Author:** [@kingblue](https://discourse.processing.org/u/kingblue)\
**Replies:** 3\
**Last updated:** [April 5, 2019, 2:40pm UTC](https://discourse.processing.org/t/find-width-and-height-of-the-text-drawn-with-text/9804 "2019-04-05T14:40:48Z")

</div>

Hi, I was wondering if it was possible to, say, draw a rectangle around the exact width and height of a block of text on screen. Let’s say my text() is like follows: String stringText = "Lorem ipsum dolor sit amet, con…

---

## [Strings! Hi Guys i can't understand why my code doesn't work!](https://discourse.processing.org/t/strings-hi-guys-i-cant-understand-why-my-code-doesnt-work/9961)

<div class="topic-metadata">

**Author:** [@fwtini](https://discourse.processing.org/u/fwtini)\
**Replies:** 7\
**Last updated:** [April 5, 2019, 2:35pm UTC](https://discourse.processing.org/t/strings-hi-guys-i-cant-understand-why-my-code-doesnt-work/9961 "2019-04-05T14:35:04Z")

</div>

Hi guys can you explain me the strings? Why my code doesn’t work? PFont myFont; int x; int y; String s="AVFTA"; void setup(){ size(500,500); background(255); myFont=createFont("SansSerif-48.tff",24); text(s,50,50…

---

## [Create callback](https://discourse.processing.org/t/create-callback/9831)

<div class="topic-metadata">

**Author:** [@Stanlepunk](https://discourse.processing.org/u/Stanlepunk)\
**Replies:** 23\
**Last updated:** [April 5, 2019, 12:28pm UTC](https://discourse.processing.org/t/create-callback/9831 "2019-04-05T12:28:25Z")

</div>

I try to create a method to make a callback, but that’s don’t work. Consol return the error message. I think my problem is from: i pass this and this don’t read my sketch i suppose ? void setup() { select\_callback("my…

---

## [Where to start with Processing with Arduino](https://discourse.processing.org/t/where-to-start-with-processing-with-arduino/9991)

<div class="topic-metadata">

**Author:** [@realmeteo](https://discourse.processing.org/u/realmeteo)\
**Replies:** 1\
**Last updated:** [April 5, 2019, 11:06am UTC](https://discourse.processing.org/t/where-to-start-with-processing-with-arduino/9991 "2019-04-05T11:06:24Z")

</div>

Hello , please can you advice me some url to start with Processing with Arduino? I work currently with Arduino and sensors, and like create for test an amazing user interface with some instruments (temperature, humidit…

---

## [\`The sketch path is not set.\` error when loading table in global](https://discourse.processing.org/t/the-sketch-path-is-not-set-error-when-loading-table-in-global/9952)

<div class="topic-metadata">

**Author:** [@jmt2080ad](https://discourse.processing.org/u/jmt2080ad)\
**Replies:** 5\
**Last updated:** [April 5, 2019, 8:34am UTC](https://discourse.processing.org/t/the-sketch-path-is-not-set-error-when-loading-table-in-global/9952 "2019-04-05T08:34:47Z")

</div>

I have a large 500K row table that I am trying to use for animating a point. All the examples I can find for loadTable() show the table loading in draw() and using a for loop there to iterate over rows. What I want to do…

---

## [How to make object bounce off another object](https://discourse.processing.org/t/how-to-make-object-bounce-off-another-object/9595)

<div class="topic-metadata">

**Author:** [@Bobby](https://discourse.processing.org/u/Bobby)\
**Replies:** 16\
**Last updated:** [April 4, 2019, 11:54pm UTC](https://discourse.processing.org/t/how-to-make-object-bounce-off-another-object/9595 "2019-04-04T23:54:59Z")

</div>

Have gotten down how to make a ball bounce with gravity. Now I want that ball to hit a moving object and bounce off it. Any help on how to to do that?

---

## [Exporting Empty Excel Files](https://discourse.processing.org/t/exporting-empty-excel-files/9969)

<div class="topic-metadata">

**Author:** [@ggates31](https://discourse.processing.org/u/ggates31)\
**Replies:** 2\
**Last updated:** [April 4, 2019, 7:45pm UTC](https://discourse.processing.org/t/exporting-empty-excel-files/9969 "2019-04-04T19:45:14Z")

</div>

I’m using processing with an Arduino sketch to measure and export IR sensor temperature data. Until recently everything was been working out great, and after I stop running processing the data that’s been collecting in t…

---

## [Is there a way to play a SoundFile muted and keep its amplitude data?](https://discourse.processing.org/t/is-there-a-way-to-play-a-soundfile-muted-and-keep-its-amplitude-data/9830)

<div class="topic-metadata">

**Author:** [@Aeggy](https://discourse.processing.org/u/Aeggy)\
**Replies:** 9\
**Last updated:** [April 4, 2019, 12:00pm UTC](https://discourse.processing.org/t/is-there-a-way-to-play-a-soundfile-muted-and-keep-its-amplitude-data/9830 "2019-04-04T12:00:19Z")

</div>

Trying to gather data from a sound file without listening to it, but I’m having trouble getting there. I thought I might be able to do it by playing the file in draw(), gathering the FFT spectrum data, then pausing at th…

---

## [Having trouble declaring a new object](https://discourse.processing.org/t/having-trouble-declaring-a-new-object/9955)

<div class="topic-metadata">

**Author:** [@hasanfarhan33](https://discourse.processing.org/u/hasanfarhan33)\
**Replies:** 1\
**Last updated:** [April 4, 2019, 10:48am UTC](https://discourse.processing.org/t/having-trouble-declaring-a-new-object/9955 "2019-04-04T10:48:33Z")

</div>

Hello guys. I am stuck on my project again. Sorry to disturb you all. I am trying to create a simple game where a particular colored box goes to its location. For example, a red box should cross the red line and a green …

---

## [Import Excel .xlsx to Processing](https://discourse.processing.org/t/import-excel-xlsx-to-processing/9816)

<div class="topic-metadata">

**Author:** [@angel96](https://discourse.processing.org/u/angel96)\
**Replies:** 6\
**Last updated:** [April 3, 2019, 7:58pm UTC](https://discourse.processing.org/t/import-excel-xlsx-to-processing/9816 "2019-04-03T19:58:15Z")

</div>

Hello! I have a problem about importing an excel file into processing. I followed this guide: Private Site but in importExcel(), at this line: Sheet sheet = wb.getSheetAt(0); show me an error: NullPointException. …

---

## [Why am I getting a NullPointerException](https://discourse.processing.org/t/why-am-i-getting-a-nullpointerexception/9932)

<div class="topic-metadata">

**Author:** [@hasanfarhan33](https://discourse.processing.org/u/hasanfarhan33)\
**Replies:** 4\
**Last updated:** [April 3, 2019, 7:01pm UTC](https://discourse.processing.org/t/why-am-i-getting-a-nullpointerexception/9932 "2019-04-03T19:01:33Z")

</div>

Hello everyone, this is my first ever personal processing project. I am trying to create a game where you send the colored boxes to their particular location. For example, the red box should go to the red position and th…

---

## [P5.js Desktop Editor](https://discourse.processing.org/t/p5-js-desktop-editor/9728)

<div class="topic-metadata">

**Author:** [@zenemig](https://discourse.processing.org/u/zenemig)\
**Replies:** 10\
**Last updated:** [April 3, 2019, 4:34pm UTC](https://discourse.processing.org/t/p5-js-desktop-editor/9728 "2019-04-03T16:34:48Z")

</div>

Hello everyone. Please let me know if this is not the place for my question. Im trying to compile my own version of the old p5.js desktop editor but is an absolute headache, due to the fact that it is abandoned and som…

---

## [\[SOLVED\] Game Control Plus: how to reconnect wireless XBOX controller after it turned off](https://discourse.processing.org/t/solved-game-control-plus-how-to-reconnect-wireless-xbox-controller-after-it-turned-off/9698)

<div class="topic-metadata">

**Author:** [@clausrogisch](https://discourse.processing.org/u/clausrogisch)\
**Replies:** 12\
**Last updated:** [March 31, 2019, 11:38am UTC](https://discourse.processing.org/t/solved-game-control-plus-how-to-reconnect-wireless-xbox-controller-after-it-turned-off/9698 "2019-03-31T11:38:27Z")

</div>

I am writing on a programm where i am using the inputs of an wireless XBOX 360 controller with the gamecontrolplus library. In addition i am using a vJoy device and X2DCLI in order to split the left and right triggers. T…

---

## [Which video exporting methods have best quality?](https://discourse.processing.org/t/which-video-exporting-methods-have-best-quality/9505)

<div class="topic-metadata">

**Author:** [@janberkjk](https://discourse.processing.org/u/janberkjk)\
**Replies:** 8\
**Last updated:** [April 3, 2019, 10:51am UTC](https://discourse.processing.org/t/which-video-exporting-methods-have-best-quality/9505 "2019-04-03T10:51:59Z")

</div>

Hi, I am trying to add some frames that I created via Processing in a video clib. But when I try to record the sketch by using the code saveframes and video maker the video quality is so bed. Which way do you think is th…

---

## [NullPointerException with ArrayList of Objects](https://discourse.processing.org/t/nullpointerexception-with-arraylist-of-objects/9895)

<div class="topic-metadata">

**Author:** [@LordBruce](https://discourse.processing.org/u/LordBruce)\
**Replies:** 1\
**Last updated:** [April 2, 2019, 10:04pm UTC](https://discourse.processing.org/t/nullpointerexception-with-arraylist-of-objects/9895 "2019-04-02T22:04:49Z")

</div>

So I am trying to get a list of objects, that when something is pressed, it will add new objects to the list to be checked. I keep getting NullPointerException and I can’t figure it out. I have tried adding a new item wh…

---

## [Keep P3D running when surface is not visible](https://discourse.processing.org/t/keep-p3d-running-when-surface-is-not-visible/9896)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 1\
**Last updated:** [April 3, 2019, 2:19am UTC](https://discourse.processing.org/t/keep-p3d-running-when-surface-is-not-visible/9896 "2019-04-03T02:19:34Z")

</div>

Is there a way to keep P3D running when the surface is not visible? void setup() { size(600, 600, P3D); PSurfaceJOGL surface = (PSurfaceJOGL) getSurface(); surface.setVisible(false); } void draw() { println(fr…

---

## [Drew an Unwanted Circle on Screen](https://discourse.processing.org/t/drew-an-unwanted-circle-on-screen/9889)

<div class="topic-metadata">

**Author:** [@kirstee\_baxt](https://discourse.processing.org/u/kirstee_baxt)\
**Replies:** 2\
**Last updated:** [April 2, 2019, 9:45pm UTC](https://discourse.processing.org/t/drew-an-unwanted-circle-on-screen/9889 "2019-04-02T21:45:21Z")

</div>

Hello! Writing some code based here, and for some reason it is generating an outlined coral colored circle. I believe this is coming from the line graph I drew (in the first begin shape) but not sure where in the code I …

---

## [Defining Coordinates of a Sphere](https://discourse.processing.org/t/defining-coordinates-of-a-sphere/9813)

<div class="topic-metadata">

**Author:** [@kirstee\_baxt](https://discourse.processing.org/u/kirstee_baxt)\
**Replies:** 5\
**Last updated:** [April 2, 2019, 7:27pm UTC](https://discourse.processing.org/t/defining-coordinates-of-a-sphere/9813 "2019-04-02T19:27:47Z")

</div>

Hello! I’m interested in defining the coordinates of where a sphere lies in a 3D space. I know sphere uses just radius sphere(r); Is there a way to define (x,y,z) values?

---

## [How to use Processing to open a new ped file](https://discourse.processing.org/t/how-to-use-processing-to-open-a-new-ped-file/9829)

<div class="topic-metadata">

**Author:** [@SandCrocus](https://discourse.processing.org/u/SandCrocus)\
**Replies:** 4\
**Last updated:** [April 2, 2019, 5:04pm UTC](https://discourse.processing.org/t/how-to-use-processing-to-open-a-new-ped-file/9829 "2019-04-02T17:04:38Z")

</div>

I want to open a specified pde file when I press the mouse. I have tried the function runtime,getruntime().exec, but it can only open an exe file. How can I open the pde file?

---

## [Rotating rects around a circle perimeter pointing to the center](https://discourse.processing.org/t/rotating-rects-around-a-circle-perimeter-pointing-to-the-center/9868)

<div class="topic-metadata">

**Author:** [@Michalis](https://discourse.processing.org/u/Michalis)\
**Replies:** 7\
**Last updated:** [April 2, 2019, 3:13pm UTC](https://discourse.processing.org/t/rotating-rects-around-a-circle-perimeter-pointing-to-the-center/9868 "2019-04-02T15:13:09Z")

</div>

Hello, I want to achieve something like this but I have no idea how. I checked almost every example, on the application and on the website, checked libraries, googled, but still, I didn’t manage to find a solution (sorr…

---

## [Accessing nested values in a table](https://discourse.processing.org/t/accessing-nested-values-in-a-table/9761)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 16\
**Last updated:** [April 2, 2019, 12:31pm UTC](https://discourse.processing.org/t/accessing-nested-values-in-a-table/9761 "2019-04-02T12:31:43Z")

</div>

I have a CSV file with no headers and where each row contains multiple lists of floats. \[(40.65, 20.30, 120.92, 86.12, 99.33), (10.35, 90.10, 10.52, 1.12, 59.3), (10.65, 62.10, 12.12, 96.23, 19.3)\] \[(96.37, 67.13, 312.6…

---

## [Shape intersection (or a way to do raster)](https://discourse.processing.org/t/shape-intersection-or-a-way-to-do-raster/9741)

<div class="topic-metadata">

**Author:** [@igorguerrero](https://discourse.processing.org/u/igorguerrero)\
**Replies:** 2\
**Last updated:** [April 1, 2019, 6:12pm UTC](https://discourse.processing.org/t/shape-intersection-or-a-way-to-do-raster/9741 "2019-04-01T18:12:42Z")

</div>

Hello! I have a set of vectorial shapes (in processing, p5, inkscape…) that combined form a image. All shapes have solid colors and a layer ranking (I know which one is on top). All I want to do is, setting a new (“ran…

---

## [Text covered by an image](https://discourse.processing.org/t/text-covered-by-an-image/9723)

<div class="topic-metadata">

**Author:** [@fwtini](https://discourse.processing.org/u/fwtini)\
**Replies:** 2\
**Last updated:** [April 1, 2019, 3:25pm UTC](https://discourse.processing.org/t/text-covered-by-an-image/9723 "2019-04-01T15:25:11Z")

</div>

Hi guys I have a problem, the letters hide or disappear when I load the image. Maybe can someone help? I am new here so I think it’s very easy! Thank you. String\[\] headlines = { "3 3 3 3 3 3 3 3 3 3…

---

## [IP Camera Integration \\w GSVideo Lib](https://discourse.processing.org/t/ip-camera-integration-w-gsvideo-lib/9838)

<div class="topic-metadata">

**Author:** [@ikerkan](https://discourse.processing.org/u/ikerkan)\
**Replies:** 0\
**Last updated:** [April 1, 2019, 2:00pm UTC](https://discourse.processing.org/t/ip-camera-integration-w-gsvideo-lib/9838 "2019-04-01T14:00:24Z")

</div>

Hello everyone, I want to get the IP camera image to my processing sketch, using RTSP protocol. I investigated the subject and found some code using the GSVideo library. When I use the library according to the examples …

---

## [displayWidth: deprecation?](https://discourse.processing.org/t/displaywidth-deprecation/9760)

<div class="topic-metadata">

**Author:** [@Eamoex](https://discourse.processing.org/u/Eamoex)\
**Replies:** 6\
**Last updated:** [April 1, 2019, 8:32am UTC](https://discourse.processing.org/t/displaywidth-deprecation/9760 "2019-04-01T08:32:50Z")

</div>

Hello All, coming back to Processing after a while. Actually I haven’t dealt much with 3.0 (it was already out when I still had my hands in 2.0, but all my sketches were 2.0 and I stuck there, being too lazy for rewrite…

---

## [Color arithmetic (getting average, etc.)](https://discourse.processing.org/t/color-arithmetic-getting-average-etc/9801)

<div class="topic-metadata">

**Author:** [@cdaein](https://discourse.processing.org/u/cdaein)\
**Replies:** 4\
**Last updated:** [March 31, 2019, 8:21pm UTC](https://discourse.processing.org/t/color-arithmetic-getting-average-etc/9801 "2019-03-31T20:21:15Z")

</div>

I am trying to do calculation on color data type. Say, I want to get an average of two colors as below, and say I cannot access the color values 0 and 255 themselves directly: color c1 = color(0); color c2 = color(255);…

---

## [Time in Processing](https://discourse.processing.org/t/time-in-processing/9799)

<div class="topic-metadata">

**Author:** [@kaushalsapre](https://discourse.processing.org/u/kaushalsapre)\
**Replies:** 2\
**Last updated:** [March 31, 2019, 8:07pm UTC](https://discourse.processing.org/t/time-in-processing/9799 "2019-03-31T20:07:36Z")

</div>

I have a .csv file with a column for time in milliseconds and another for speed in kmph. I would like to create a visualization for a speedometer using processing. My framework for the solution was to create a counter t…

---

## [2 played games, connected with WIFI](https://discourse.processing.org/t/2-played-games-connected-with-wifi/8985)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 3\
**Last updated:** [March 31, 2019, 2:56pm UTC](https://discourse.processing.org/t/2-played-games-connected-with-wifi/8985 "2019-03-31T14:56:58Z")

</div>

Hi! I’ve always wanted to make a 2 player game, which they play through internet. I saw a web function in reference, so i started wondering if its possible. I was thinking maybe i host wix site, with like 10 “sessions”.…

---

## [String of thumbnail images instead of characters](https://discourse.processing.org/t/string-of-thumbnail-images-instead-of-characters/9725)

<div class="topic-metadata">

**Author:** [@gdesigner](https://discourse.processing.org/u/gdesigner)\
**Replies:** 2\
**Last updated:** [March 31, 2019, 1:03pm UTC](https://discourse.processing.org/t/string-of-thumbnail-images-instead-of-characters/9725 "2019-03-31T13:03:06Z")

</div>

Hello, I’m new to Processing and this forum but I’m trying to create a project for University, where you can create a unique street as you type. I have started with the character string example, however, instead of a ch…

---

## [Show an desktop menu bar](https://discourse.processing.org/t/show-an-desktop-menu-bar/9651)

<div class="topic-metadata">

**Author:** [@Stanlepunk](https://discourse.processing.org/u/Stanlepunk)\
**Replies:** 14\
**Last updated:** [March 31, 2019, 10:23am UTC](https://discourse.processing.org/t/show-an-desktop-menu-bar/9651 "2019-03-31T10:23:18Z")

</div>

I try to add a menu bar on the top of my desktop, i’m close but I fail :slight\_smile Obviously I don’t want open a new frame, but I cannot figure the way to do that. my code is here Menu\_bar mp; void setup() { build…

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=309)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=311)
