posted 18 years ago
Hi
I don't understand why i don't get my screen size (it gives me 0) with the same way that it get it in my paint method. In paintComponent i have a function fillRect(0, 0, getWidth(), getHeight(), this); nad it works and fills my screen with given colour. But in same class, in constructor i want to give values to int x, y; , so that x=getWidth()/2 and y=getHeight()/2 -- but it gives 0. What's the problem? How should i assign those values to x and y?
code:
[ February 28, 2004: Message edited by: Juhan Voolaid ]