Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Displaying a changing variable in G4P GUI

$
0
0

Hello,

I am using the latest versions of G4P library and the G4P GUI Builder tool. I have two variables, which are being delivered from a connected Arduino via serial. One of them is a simple countdown timer, the value of which changes every second. The variables have been converted to a String and I can print them in the Processing Console with no problem.

What I want to do is display them in the G4P created GUI. I have inserted the String name into setText but it does not display. If I use a test String which does not change, then it does display. I have also added forceBufferUpdate() but this has not solved the problem.

Any help would be greatly appreciated.

Below is an excerpt from createGUI() on the gui tab where stringTime is the String containing the counting down timer:

timelabel = new GLabel(this, 218, 273, 80, 20); timelabel.setText(stringTime); timelabel.setOpaque(false); timelabel.forceBufferUpdate();


Viewing all articles
Browse latest Browse all 2896

Trending Articles