How do you know the available real state in the container/framing component?
posted 13 years ago
I have a JPanel with which I need to use absolute positioning. Thing is that the JPanel goes inside a JTabbedPane in a JApplet that reads its width and height from parameters in the page. My problem is that for absolute positioning you got to use "setBounds"; effectively indicating the position and size of the component. But, how do you know the available space in the container framing the component? I need to know it to use maximun available width and height to properly space and position three components? And possibly lay them out in a way that if the external component is resized they would adjust their size fitting nicely. I have gone through the swing API and done some search, but I simply don't find an answer to my question. I could imagine other swing developers have found similar needs. How do you know the available real state in the container/framing component? Thanks