mitchell bat wrote:What's so bad about having jframe extended from your class?
Campbell Ritchie wrote:Extending a frame usually means adding business logic to it. The business logic should be in a different class. Keep the display classes for display and the business logic classes for business logic. That way, you don't often need to extend display classes.
Paul Clapham wrote:
If you were going to have several of those JFrames in your application and you always called the same methods as part of their initialization, you might then think of having a subclass of JFrame with those standard initializations built in. But even then you would be better to have a factory method which created a JFrame and initialized it in the standard way.
mitchell bat wrote:So instead of extending the frame what do you think would be a better approach?
mitchell bat wrote:Done and nothing changes
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton