Is there any way that I can pass a variable to paint()? I am trying to make an applet of a real-time graph, and it's impossible to put labels on the axes, because the graph gets scaled at every repaint, so the y-axis changes position all the time. <br>So, I tried doing it from outside, scaling it once, and passing the scaling factor to paint() just once, since it doesn't change much. <br>But it's impossible...I can't get the width and the height of the frame if I do it outside paint. I tried creating another method with the values, and calling it from inside paint...no luck, since the values are zero, without the dimensions. And even if I find a way to do that, if then I want to maximise the graph window, since the scaling is not done in paint anymore, it won't rescale, as it does now. <br>I hope this is all clear, I'm fairly new in Java programming...does anyone have any ideas, or any applets of resizable scaled real-time graphs with numbered axes that I can look at? Thanks!