I was wondering if there was a way to get a G4P secondary window to behave like a modal dialog-- I would like to create code that would require the user to remain in the window, and to provide an answer, before the window was made not visible. I am trying to create a sequence of calls to various methods that includes real time user input-- method one asks the user for input, and then that input is used as a parameter to method two, etc. If this is confusing, I apologize and can post some code or pseudocode. However, this seems like a somewhat more generic question that might have a generic answer… Processing threw exceptions when I tried to mix Swing JOptionPane dialogs into the mix.
At some time in the past Processing changed its dialogs from modal to concurrent (opened in a separate thread), I decided to recreate the modal dialogs in G4P. G4P includes an example demonstrating the range of dialogs provided by the library. I suggest you have a look and see if they will do the job you want.
If they don’t —
I suspect that it is possible to do that but I would need a concrete example on what you mean, perhaps a very small example that I can run
Well, I feel kinda dumb. I didn’t see anything in the class reference index or other parts of your website, and I didn’t look at the examples. You have exactly what I need. Thank you. I’m sufficiently comfortable with the programming to go forward from here.
The only other outstanding issue for me is potentially incorporating pull down menus-- it would clean up the interface a bit. Please don’t answer that query for me alone, but if you have already invented the wheel just point me to it.
This environment you have created is very robust and easy to manipulate and has permitted me to focus on implementation of my hardware and software rather than the GUI. I am most grateful. If you are interested, when my project is complete I can fill you in a bit more-- I’ve developed a hardware-software combination to acquire images of 3D objects so that they can be turned into 3D images (I’m not smart enough to do the phtogrammetry part, this is only image acquisition. I feed the images into a photogrammetry application such as Colmap.)
Your project sounds fascinating, perhaps you could create and share a video of the finished project in action.
G4P doesn’t have menus but you could look at
- GPanel , these panels can hold other G4P controls and can be dragged and / or collapsed
- the new control GControlPalette provides fast easy access to multiple controls or
- GGroup which aggreagates controls so you can make them visible / invisible, fade in / out as a group
there are examples of all these with the library.
BTW I am pleased you like G4P