I'm just starting to learn Java and I need help. I'm trying to draw a rectangle in an applet window and have it centered so that if the applet is repainted when it is resized, the rectangle will stay centered in the applet window. I know how to retrieve the size of the applet, but I'm not quite sure what to do to center the rectangle. Can someone link me to a tutorial that explains something like this?
packetpirate 0 Junior Poster in Training
jon.kiparsky 326 Posting Virtuoso
packetpirate 0 Junior Poster in Training
jon.kiparsky 326 Posting Virtuoso
packetpirate 0 Junior Poster in Training
packetpirate 0 Junior Poster in Training
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
packetpirate 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.