I had to find a program that demos a bouncing ball in JPanel and I did that. The next evolution is taking that program and making it add a new ball with each mouse click. I have attempted a few things but now I am totally lost with this project. I was able to get the code to compile but not run.
Anyone have a helpful idea how I can unfunk this code and get it going the right direction? As always, the help is appreciated!
I don't see code that would add a JPanel (or anything, actually) to the JFrame. That the JFrame is sized to essentially nothing is because of the "pack" call - if a frame is empty, then there's no need for it to take up space.
If you create a method and don't write anything in it, NetBeans will write "throw new UnsupportedOperationException();" which is useful for method which you intend to implement later. When you have interfaces and wish to leave some of the methods blank, as you have found the hard way ( ) it doesn't help.
machines help you to do more, but experience less. Experience this tiny ad: