I am trying to overlay text over a DrawableButton. Someone else tried here and was told to override LookAndFeel to do so. I tried overriding drawDrawableButton but this does not work because of the order of events when painting the component:
- Component gets painted
drawDrawableButtongets called, text is drawn- Component children get painted over the top of component, covering the text
- paintOverChildren gets called (empty function body in base class)
If there was something to the effect of paintOverChildren in LookAndFeel, it would not be necessary to subclass DrawableButton and override paintOverChildren to overlay text. It does seem like DrawableButton was intended to be able to handle overlaying text via LookAndFeel.
Please consider either adding to LookAndFeel or adding an option to DrawableButton to overlay text as suggested in this other post.
