I was in Eclipse, trying to add a MultiList to my project, but the constructor for ControlP5(PApplet applet) didn't seem to work, because it was throwing a NullPointerException, which had no possible explanation. So I tried by adapting the example of MultiList usage that can be found in controlP5 Javadoc, but that exception is thrown again! BUT both things work if I run them in pure processing language, in the Processing IDE.
Is this a bug? Am I doing something wrong? or what is happening here?
I've already finished the first draft of my applet and it works properly in processing environment, but when I move the applet into Eclipse for integration with the rest of my project, it doesn't work because it's not able to find the resources (images, fonts), previously stored in the 'data' directory. I've tried copying the data directory to the same path as the applet class, as well as moving just the contents into that path, but no option works. Which one is the directory where I should place them?
I'm working on a project which requires drawing a list of elements, like Swing.JList, but not using Swing nor AWT. To reach this, I first tried guicomponents (
http://www.lagers.org.uk/g4p/index.html), but it doesn't contain nothing similar to what I'm looking for.
Therefore, I started to 'research' with controlP5 (
http://www.sojamo.de/libraries/controlP5/). In there, there's an element called ListBox, which perfectly fits my needs..or almost. My applet is oriented to be used in 100% touch-driven devices, like tablets or multitouch tables. Because of that, it's essential that the lists are scrollables by touching one of the elements and 'throwing' it upwards or downwards (like sliding the list from the elements), and so the scroll will just be used to provide feedback to the user about the current position of the list he/she is placed at (and, obviously, keeping its old functionality of moving the list).
Any ideas on how can I make a new class extending that ListBox class but which adds this functionality (this is what I'd prefer to do, because the ListBox look fits 1000000% with the rest of my interface) or something similar with another library? (or whatever you can imagine, but it's completely essential that lists acquire that touch-scrollable functionality)
first of all, I have to say I love this project. It provides a pretty easy way to create applets, much easier than doing it directly in Java (in my opinion).
Now, let's head to the problem: I am developing an application using the MT4j project functionality. It is supposed to have several instances of an application that I had already developed, but working at the same time and running on the same screen. Each instance would have several AWT items, between them JLists, but I've read that AWT stuff may bring problems when working with MT4j so that's why I'm using Processing: I'm converting my AWT application into an applet which will make no usage of AWT. The problem is that I can design things like JButtons, JLabels or non-scrollable lists without AWT just by using the Processing tools BUT scrolls? How could I create an scroll so that a list can be walked through completely, with no dependency on the number of elements?