I have some problems in using GUI Builder in Processing, could someone can help me solve them? Thank you.

I have downlad the G4PTool V4.4.1.zip and put it in Procssing/tools folder, and I restart Procssing, after that what should I do to start use GUI Builder?

I have looked at the website http://lagers.org.uk/index.html and watch the related video, I see that there will be a GUI Builder window for us to using GUI Builder. However, when I restart the Processing, I did not see any related GUI Builder window.

At the top you can choose the type of thing you want to install, the most common being Libraries and Tools. As well as GUIBuilder you need to install the library G4P as shown in the window. You will also use CM to update your libraries and tools.

Just to explain, the G4P library provides all the controls, button, labels, textfields etc for your sketch and GUI Builder is just a tool to help you design and create your GUI.

Now start a new sketch and select Tools > G4P GUI builder from the menus and the GUI design will open.

I strongly suggest that you just play with GUI Builder and G4P so you get an understanding of how to use them before you get down to creating a serious sketch with them.

By the way, I would be grateful if you would allow me to have further private communication with you by email, because I am not familier with this and I am a green hand. I have contacted with you by the Contact Me window in your website, but there is nothing happening, I think there is something wrong about this module: )

If you think it’s inconvenient for me to contact you through email, that’s OK. But I still want to thank you very much.

I have tried to use GUI Builder, and I find it is a very very useful tool
I have a question now. When I use GUI Builder, I create main window, window1, button1 in the main window, button2 in window 1. First, when I run Processing, I want only the main window showed. Second, when I click button1, window1 is showed; when I click button2, window1 is disappeared.

I have tried this code:

window1.setVisible(false);

But I can not implement the first function, I then tried to put all codes related gui to customGUI() method, I also can not implement the first function.

I have a problem.In a window, when I use keyboard to type a number, then the number will be stored in an array in my program.That means I store the number, which component should I use? I can not find some suitable components. Could you please help me?

When I type number in the TextField in my window, the console gives me all 0.0 0.0 0.0…That means it did not recognize my typing number. Did I make some mistakes?

Second, I want to implement this function. When I type a number, the program will stored the number util I click ‘‘Enter’’ key in my keyboard, not show the number in the console immediately. I think maybe I can implement this function by using the customGUI() method?

I am sorry that I ask more questions, I am a green hand in Processing. I think the more I ask, the more I will learn

The difference is the first one is will handle events from all text controls so you have to test the source to decide what to do. The second one is associated with a particular control, in this case the GTextField object textfield1 and is created by GUI Builder with the following statement which you can see in the gui tab.

textfield1.addEventHandler(this, "textfield1_change1");

So the user has the option of using the generic text event handler or overriding it by adding an event handler specific to the control with addEventHandler.

OK so the above is just to explain the difference between the 2 event handlers so we come to this

wwave:

When I type number in the TextField in my window, the console gives me all 0.0 0.0 0.0…

To make a GTextField validate numeric input we need to do something extra, so in customGUI() add the linetextfield1.setNumeric(-100.0, 100.0, 0);

this will make the control (created in GUI Builder) validate numeric input, in this case numbers between -100 and +100 starting value 0.

Unfortunately you can’t set this in GUI Builder itself since this and GSpinner are very new updates that are not shown in GUI Builder yet.

wwave:

When I type a number, the program will stored the number util I click ‘‘Enter’’ key in my keyboard, not show the number in the console immediately

There are different types of text event so we need to filter the event to get the one we want

When I type number in the textfield and click ‘Enrer’ key, I think the number will be stored in the global variable countStep, however, when I click button which calls buttonClick method, zero will be showed on the console .
Could you please help me? Thank you very much.

When I type 4, 5, and all numbers range from 1- 8 in the textfield, zero will be showed on the console, nothing else. I think it give my wrong answer.

However, when I use this code:

textfield1.setNumeric(1, 8, -1);

When I type 4, 5, and all numbers range from 1- 8 in the textfield, the number which I typed will be showed on the console. For example, when I type 3, 3 will be showed on the console.

I think my Processing may have some problems, so I reinstall Procssing and GUI Builder, and I tried again. They both give me right answers–when I type all numbers range from 1- 8 in the textfield, the number which I typed will be showed on the console.