06-17-2014, 12:19 AM
My apologies for the delay. As far as drawing on a JPanel goes, you would need to follow the standard procedure of all Canvas-esque Java objects.
1) Get the graphics object of the JPanel
2) Create the object you want to draw
3) Have the graphics object draw that object
These pages may help you:
<!-- m --><a class="postlink" href="http://docs.oracle.com/javase/7/docs/api/javax/swing/JPanel.html">http://docs.oracle.com/javase/7/docs/ap ... Panel.html</a><!-- m -->
<!-- m --><a class="postlink" href="http://docs.oracle.com/javase/7/docs/api/javax/swing/JComponent.html#getGraphics(">http://docs.oracle.com/javase/7/docs/ap ... tGraphics(</a><!-- m -->)
<!-- m --><a class="postlink" href="http://docs.oracle.com/javase/7/docs/api/java/awt/Graphics.html">http://docs.oracle.com/javase/7/docs/ap ... phics.html</a><!-- m -->
1) Get the graphics object of the JPanel
2) Create the object you want to draw
3) Have the graphics object draw that object
These pages may help you:
<!-- m --><a class="postlink" href="http://docs.oracle.com/javase/7/docs/api/javax/swing/JPanel.html">http://docs.oracle.com/javase/7/docs/ap ... Panel.html</a><!-- m -->
<!-- m --><a class="postlink" href="http://docs.oracle.com/javase/7/docs/api/javax/swing/JComponent.html#getGraphics(">http://docs.oracle.com/javase/7/docs/ap ... tGraphics(</a><!-- m -->)
<!-- m --><a class="postlink" href="http://docs.oracle.com/javase/7/docs/api/java/awt/Graphics.html">http://docs.oracle.com/javase/7/docs/ap ... phics.html</a><!-- m -->