I'm drawing a series of shapes on a JPanel and then adding to JApplet Content Pane. Is there a way to draw shapes and then when you change the size of the JApplet to have the shapes resize in relation to the container they are in? Thanks.
Here's another example that might make it clearer what I'm trying to do.
If I create a 500x500 JApplet (setSize in JApplet) and draw a square near the boundaries of the JApplet. Is there a way to use the JApplet on a html page but have it display at a reduced size (say 100x100) whereby it looks like a minature version of? The reason for this is I want to have a small image on the page but putting the mouse over a div tag holding a reference to the same JApplet display opens except it's a larger version of. Similar to viewing a larger image of a product on an e-commerce site.
I'm using drawRect and drawLine to draw directly on the JPanel I'm using that gets added to the JApplet.