We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › using java.awt.textarea
Page Index Toggle Pages: 1
using java.awt.textarea (Read 890 times)
using java.awt.textarea
Jun 11th, 2006, 5:57am
 
I've created an application that uses 4 text areas, imported from java.awt.TextArea, to read and update elements from an xml file.

I've tested it with a few colleagues and the issue I'm running into is this:

The text areas are added inconsistently when the program runs. That is, on both my and my friend's computers they're added every time. On 3 other people's computers (we're all running OSX) the areas often don't appear, or only 1 or 2 appear instead of all 4, and if they keep closing and running the app again all 4 will eventually appear.

This happens whether the program is run from processing directly or through the exported application.

===

I use the following code:

import java.awt.TextArea;
//...
TextArea ta1,ta2,ta3,ta4;
//...
void setup(){
 //...
 ta1 = new TextArea("·",7,31,1);
 ta2 = new TextArea("·",7,31,1);
 ta3 = new TextArea("·",8,31,1);
 ta4 = new TextArea("·",8,16,1);
 this.add(ta1);
 this.add(ta2);
 this.add(ta3);
 this.add(ta4);
 //...
}
//...

Does anyone have an idea as to why the textareas appear only occasionally on some computers and always on others?
Re: using java.awt.textarea
Reply #1 - Jun 15th, 2006, 10:35pm
 
I'd try putting a size(x,y); statement as the first thing you do inside setup() {}, otherwise you're asking for trouble.
Re: using java.awt.textarea
Reply #2 - Jun 20th, 2006, 3:25pm
 
at the top of the page, type "textarea" into the search box. you'll find several posts about why this happens.
Page Index Toggle Pages: 1