Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Ben Jass wrote:The results that were printed were: -1 and 1.
So I checked the methods that could be called on an ImageIcon object and nothing indicates a setSize() method.
The actual file dimensions:
Width: 110
Height: 136
So I tried extending from JPanel, overriding the paintComponent() method:
My paintComponent() method never ran?
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
Ben Jass wrote:The results that were printed were: -1 and 1.
So I checked the methods that could be called on an ImageIcon object and nothing indicates a setSize() method.
The actual file dimensions:
Width: 110
Height: 136
So I tried extending from JPanel, overriding the paintComponent() method:
My paintComponent() method never ran?
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
Fred Kleinschmidt wrote:As Les Morgan's example shows, your first statement in paintComponent() should be
But then I don't think you even need to override the paintComponent() method at all. You set the Icon to be the icon in the userHookLabel child, so the label will be automatically rendered when your component is rendered.
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
Consider Paul's rocket mass heater. |