Loading...
Logo
Processing Forum
Both the G4P library and its associated GUI Builder tool are now available for download. In particular this new version of G4P (3.1.0) usues the new event model and classes in Processing 2.0 so is no longer compatible with Processing 1.5.1.

G4P 3.1.0 (download from GoogleCode)
GUI Builder 2.1.0 (download from GoogleCode)

They should also be available using the Processing IDE.

Replies(21)

Thanks for this new release.
I downloaded the new tool and the new library manually, but then processing (2.0b7) gave ma an error with the tool.
then I've tryied to make processing download them for me and everything went fine, now the Gui builder run as expected.
Don't know why the manual installation faulted.

Sorry, that's a pic i've taken. I'm sorry i didn't copy & pasted the text, because after auto-installation that worked, so I cannot re-propose the error.

I wish that's enough.
Davide.
Don't know why the manual installation faulted.

I don't either but if something like this happens again then "processing (2.0b7) gave me an error" is not enough information if you want someone on the forum to help resolve the problem.

Processing prints error information in the bottom (black) pane, copy and paste this into your forum post next time, it will help others help you.

I hope you enjoy the library and tool.
The original download from GoogleCode was faulty and it gave the error you show here. I replaced the download within 90 minutes but you must have got the original. Sorry about that.

i tried yesterday, it works well, thanks fot your work
Two issues to check:

-GTabManager, still don't let me do SHIFT+TAB.
Using just TAB works.

-the example WindowStarter doesn't work.
the error reported is:
     the function GetID() does not exist.

cheers!
The WIndowStarter example had not been changed to use the new Processing Event class, it was still using the Java Event class.

Replace the windowMouse method with the code below and it will work.

Copy code
  1. void windowMouse(GWinApplet appc, GWinData data, MouseEvent event) {
  2.   MyWinData data2 = (MyWinData)data;
  3.   switch(event.getAction()) {
  4.   case MouseEvent.PRESS:
  5.     data2.sx = data2.ex = appc.mouseX;
  6.     data2.sy = data2.ey = appc.mouseY;
  7.     data2.done = false;
  8.     break;
  9.   case MouseEvent.RELEASE:
  10.     data2.ex = appc.mouseX;
  11.     data2.ey = appc.mouseY;
  12.     data2.done = true;
  13.     break;
  14.   case MouseEvent.DRAG:
  15.     data2.ex = appc.mouseX;
  16.     data2.ey = appc.mouseY;
  17.     break;
  18.   }
  19. }

The Shift/TAB issue must be something to do with Linux and I don't have a Linux machine to test it with. Let me think about that one.
If there's something i can do to test, let me know.
Thanks.
Hi I think there's an Issue with GButtons, or better with the fireAllEvents method... (or maybe my fault).

if i set MyButton.fireAllEvents(true) , then I can read MyButton.PRESSED event, but cannot read MyButton.RELEASED event.

the workaround by now is:
Copy code
  1. if ((button == MyButton) && (event != GEvent.PRESSED)) {
  2.       println("Click Released");
    }
Know why?

Thanks. Davide.
There is a bug in the GButton class which I have fixed and will be available in the next release.

The bug only appears when fireAllEvents is set to true so is not a problem for ,ost users.

If you press and relaease the butoon when fireAllEvents is true then you get one of two sets of evennts depending on whether the mouse has moved between the press and release of the key

If there was no movement you get a PRESSED followed by a CLICKED event.
If there was movement you get a PRESSED followed by a RELEASED event

Hopefully a new version of G4P with these bug fixes but some new functionality will be released early in the new year.


In future please post questions or problems experienced with G4P in the Contributed Libraries Forum since they are not really part of this topic which I used to announce the new library.. The CLF is used to post queries about libraries.

Thanks for reporting these problems, V3 was a complete re-write of the library code so it was inevitable that some bugs sneaked into the final release.
Ok. no problem.

Thank you Peter.
Hi
 
Just having some trouble with the gui buider, I am probably doing something wrong
I am using proccessing 2-0-67, I installed gui builder v2.1.0 and g4p 3.1.0
All worked ok
I opened gui builder and made a form
then saved the project ,
then closed processing,
I reopened processing opened the project  it will run ok no errors
but when I open the gui builder to edit the gui ,
It will not open the work area, correctly  the property panel etc openes but the work area and buttons area  
is emply no even the background grafics . Any Ideas ( the same fault happens on 3 different computers window 7 or Xp.)
 
Thanks Owen  
 
 
 
I am certain that this is a bug in the tool and I am confident that I have the solution, but jI need your help to confirm it.

When you opened the tool after reopening the sketch there would have been an error message in the bottom pane of the PDE. Please copy and paste it here.

Thanks
hi
 
Thanks for the reply
windows won.t copy the bottom pane, So Here are the last couple of lines
if you need more I can take a pic.
 
java security accesscontrolcontext$1.DoIntersectionPriviledge(AccessControlContrext.Java:87)
            at java.awt event queue dispatch event (eventqueue.java 616)
 
the interesting thing is if I run the mouse over the unfilled part of the builder window some of the
missing parts start to appear.
 
Cheers Owen 
 
 
 
  
If you click in the bottom pane then press ctrl + A to select everything then ctrl + C it should all be in the clicpboard. It works for me in Windows.

If that doesn't work then a picture would be good.

Thanks.
Ok here it all is
===================================================
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
 at g4p.tool.components.DText.draw(Unknown Source)
 at g4p.tool.components.DTextIcon.draw(Unknown Source)
 at g4p.tool.components.DButton.draw(Unknown Source)
 at g4p.tool.components.DWindow.draw(Unknown Source)
 at g4p.tool.gui.tabview.WindowView.paintComponent(Unknown Source)
 at javax.swing.JComponent.paint(JComponent.java:1029)
 at javax.swing.JComponent.paintChildren(JComponent.java:862)
 at javax.swing.JComponent.paint(JComponent.java:1038)
 at javax.swing.JComponent.paintChildren(JComponent.java:862)
 at javax.swing.JComponent.paint(JComponent.java:1038)
 at javax.swing.JComponent.paintChildren(JComponent.java:862)
 at javax.swing.JComponent.paint(JComponent.java:1038)
 at javax.swing.JComponent.paintChildren(JComponent.java:862)
 at javax.swing.JComponent.paint(JComponent.java:1038)
 at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
 at javax.swing.JComponent.paintChildren(JComponent.java:862)
 at javax.swing.JComponent.paintToOffscreen(JComponent.java:5131)
 at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
 at javax.swing.RepaintManager.paint(RepaintManager.java:1225)
 at javax.swing.JComponent.paint(JComponent.java:1015)
 at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
 at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
 at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
 at java.awt.Container.paint(Container.java:1778)
 at java.awt.Window.paint(Window.java:3379)
 at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:797)
 at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
 at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:694)
 at javax.swing.RepaintManager.access$700(RepaintManager.java:41)
 at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1636)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
 at java.awt.EventQueue.access$000(EventQueue.java:84)
 at java.awt.EventQueue$1.run(EventQueue.java:607)
 at java.awt.EventQueue$1.run(EventQueue.java:605)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
 at g4p.tool.components.DText.draw(Unknown Source)
 at g4p.tool.components.DTextIcon.draw(Unknown Source)
 at g4p.tool.components.DButton.draw(Unknown Source)
 at g4p.tool.components.DWindow.draw(Unknown Source)
 at g4p.tool.gui.tabview.WindowView.paintComponent(Unknown Source)
 at javax.swing.JComponent.paint(JComponent.java:1029)
 at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
 at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
 at javax.swing.RepaintManager.paint(RepaintManager.java:1225)
 at javax.swing.JComponent._paintImmediately(JComponent.java:5072)
 at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
 at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:786)
 at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
 at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:694)
 at javax.swing.RepaintManager.access$700(RepaintManager.java:41)
 at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1636)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
 at java.awt.EventQueue.access$000(EventQueue.java:84)
 at java.awt.EventQueue$1.run(EventQueue.java:607)
 at java.awt.EventQueue$1.run(EventQueue.java:605)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
 at g4p.tool.components.DText.draw(Unknown Source)
 at g4p.tool.components.DTextIcon.draw(Unknown Source)
 at g4p.tool.components.DButton.draw(Unknown Source)
 at g4p.tool.components.DWindow.draw(Unknown Source)
 at g4p.tool.gui.tabview.WindowView.paintComponent(Unknown Source)
 at javax.swing.JComponent.paint(JComponent.java:1029)
 at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
 at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
 at javax.swing.RepaintManager.paint(RepaintManager.java:1225)
 at javax.swing.JComponent._paintImmediately(JComponent.java:5072)
 at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
 at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:786)
 at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
 at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:694)
 at javax.swing.RepaintManager.access$700(RepaintManager.java:41)
 at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1636)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
 at java.awt.EventQueue.access$000(EventQueue.java:84)
 at java.awt.EventQueue$1.run(EventQueue.java:607)
 at java.awt.EventQueue$1.run(EventQueue.java:605)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
 
thanks Owen
Hi Owen

Thanks for that it confirmed three things
  1. there is a bug in the tool
  2. I know what the bug is
  3. I know how to fix it.
Great news eh!

This bug occurs when the tool tries to open a previously saved GUI that has buttons, labels, checkboxes and/or options.

As this bug has a major impact on the tools usability I will release a new version of the Tool as soon as possible.

BTW I believe your sketch has 5 Buttons and no labels, checkboxes or options.
The GUI builder tool has been fixed and updated (V2.1.1) and is available for download from here.

It will also become available through the PDE but I don't know how long that takes to filter through the system.
Hi
 
Well done
 
I tested it again all good
 
Thanks  Owen
 
ps. Great tool
I am sorry but is it just me or the link is loading terribly slow? I mean the lagers one ...


____________________________________________________________________
“To err is human, but a human error is nothing to what a computer can do if it tries.”  Free hosting
I have just tested the links and the webpages loaded quickly for me.