I'm writing a program where I need to (with every JMenu item click) create a new rectangle object. Im just unsure about how to create a new mouse-movable object so it is displayed within the JPanel. Any related help would be great. Cheers to Nate btw who gave me a nudge in the right direction!
You're going to need to use one of the Collections classes like ArrayList, LinkedList or Vector for this... if you're using a separate panel for each then this can hold references to the JPanel objects. If you're drawing each object as a rectangle inside a component's paintComponent() method you can store them as Rectangles. In either case, you're just going to construct a new JPanel or Rectangle, add it to the list, and repaint.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.