Right- this is want I want to do.
I have a background image which is added to as a background image to a third party API class which extends Java.awt.Container. Such container is then added to the Content Pane of MyClass (which extends JFrame)
I want to read the width and height of the image and resize MyClass accordingly.
Problem is calling theImage.getWidth(MyClass.this) or theImage.getWidth(theThirdPartyAPIContainer) always return -1 and -1 denoting that no information is available.
What do I need to do to obtain the height and width?
I have a background image which is added to as a background image to a third party API class which extends Java.awt.Container. Such container is then added to the Content Pane of MyClass (which extends JFrame)
I want to read the width and height of the image and resize MyClass accordingly.
Problem is calling theImage.getWidth(MyClass.this) or theImage.getWidth(theThirdPartyAPIContainer) always return -1 and -1 denoting that no information is available.
What do I need to do to obtain the height and width?