Recreating Component GUIs
posted 3 years ago
You need a GUI component which looks just like a JButton, but which needs to extend some other class? That's not a good idea (partly because you can't do it, as you already found). Perhaps you should try composition instead of inheritance? This would involve writing a class which extends your abstract class and which contains a JButton. You would then just put that JButton into your GUI, and write the code extending your abstract class which works with that JButton.