I've been working on an applet the past couple of days that basically acts as a very specialized calculator. I've written other applets that use the same method that I'm using here, but for some reason I can't seem to get a couple of the panels to revalidate() and repaint(). Here is the section of code I'm working on:
I have all of those println() as I'm trying to debug. I've checked the TestSim objects and they're being stored in the ArrayList active properly. Additionally, I can retrieve all of the information properly. I've identified the updatePlot() method as the problem:
I've used this method many times before and was able to add and repaint the plot just fine. However, it doesn't seem to be working this time. I've been at it all day, and I'm hoping some fresh eyes may catch something simple that I've missed.
Also, in case you're unfamiliar with jmathplot, here is the project site: https://code.google.com/p/jmathplot/ It has all of the source code and documentation. It's a really nice little package, and if I wasn't so busy with my current work, I would join to add a few features.
Thanks for taking a look!
Joined: Mar 20, 2013
I've been working on it a bit more. Here's the console output if I click on the "Generate" button.
Nevermind. I was able to figure it out. Today, as I was combing through my code trying to figure out what I could take out to make it easier to read (for all of you), I noticed that on line 311:
I add the plot panel instead of its container (plotContainer). Changing this solved my problem. However, I did notice that the string output hasn't changed at all. It's not important, but food for thought.