Hi!

I'm writing a program thats due tomorrow and I have a problem with one aspect:
I can draw the picture I want and everything using paintComponent, but then when the user pulls the edge of the window, the program should resize the whole picture- redraw it i guess...
How do I "tell" the program how to calculate the picture in terms of the new frame, how do I know what is the size of the new frame? I have always done it for a frame with predefined dimensions and then when the user resized the window, the picture stayed the same- it simply did not fit in the frame fully....

You can use getWidth() and getHeight() for those parameters.

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.