I'm trying to make my first java bean. It extends JPanel. I view it
by instantiating an instance of it within a JPanel, which is itself
on a JFrame.
1. I try to use setFont twice within the bean's paint method, so I
can have 2 different fonts on the bean's display. This doesn't
work. Seems I can only use setFont once. Is there some way I can
reset Fonts within a single paint method?
2. I want to change the background color of the bean. Within the
bean's paint method, isOpaque tells me I've successfully made the
bean opaque, and getBackground tells me I've successfully changed the
background color to white. Yet, it always displays as default gray.
Any ideas about what I'm doing wrong?