1. weird insets change in JFrame subclass java-forums.orgHi, I have a strange problem concerning one of my classes that extends JFrame. The application using it starts with a dialog with a listener registered to it that builds and displays a game window (class GameFrame; the class in question) whenever the user chooses OK in the dialog. When this window is closed it is disposed (using DISPOSE_ON_CLOSE as closing ... |
2. Is javax.swings.JFrame class a subclass of java.awt.Frame ? java-forums.orgI am really not lazy. I just cant be sure since that looks like a serious book. So if you are here to judge, save your thoughts please. All I require is simple Yes or No answer. I am a beginner, and I do not have anyone experienced around me to consult. Thanks. |
3. JFrame subclassing forums.oracle.comOn this forum some time ago, I think I remember the comment: "Do not subclass unless you change the behavior of the parent class". That makes sense to me. Yet, in many tutorials I see classes that subclass JFrame and do not change the JFrame behavior. More generally, subclassing while not changing behavior is poor OOP and not the proper use ... |
4. Extending JFrame to a subclass and testing it forums.oracle.com1) I know what your book says, but unless you're adding functionality to JFrame, you really shouldn't be extending it. Instead just create an instance of JFrame and use it. 2) Were you expecting something to appear in your window? You do realize that nothing was added to it. 3) If you're saying your size settings aren't being applied, that's because ... |