Consider a scenario. I have a frame on which I have a Panel. say I place a label in the panel, how do I know what is the position of the label with respect to the panel and not frame. Usually label.getX() will give me its position on the frame and not panel. How do I get around this issue. Its very urgent
Success is not the key to happiness. Happiness is the key to success. If you love what you are doing, you will be successful
posted 5 years ago
Usually label.getX() will give me its position on the frame and not panel.
No, the getX() method returns the postition relative to the panel.
If you think you still have a problem then post your SSCCE that demonstrates the problem.