I am a beginner at programming Java applets. I’m currently designing a website for desktop/mobile screens. I would like the applet to show up on as many different devices as possible (for example, desktop, tablets, and iPads).
One question I have is about incorporating graphics into a Java applet. I guess I’m over-thinking it, but I’d like to know if the graphics will resize if the Java applet resizes. Will I need differently-sized graphics for each individual screen size?
Maybe your main question here:
For the full explanation, I will say when you initialize applet. As you said, every device has its own size, so you should take size of applet base on size of device.
And, when user resize the applet, the applet will automatically call method
repaint, and every your graphics will repaint again, great !!!But, it doesn’t mean your graphics will resize. it depends on how you write your graphics code in applet. if size of graphics base on width/height of applet, it will resize base on formula you has set. but if you make size of graphics base on constant number, nothing happen. it will repaint the graphics, but with same size.
Hope this help 🙂