Question by Tyler: What is the difference between a java window and a java frame?
Why do the Window constructor methods create invisible windows?
What are reasons a frame is a subclass?
In what situation would I use a window and a frame in the same application?
I’m trying to learn about java. Any help?
Thanks, Tyler
Best answer:
Answer by Ricky Peña
It would create an invisble window if
1. you didn’t import the package, or
2. the size is invalid. (the window is overloaded)
Frames are subclasses because they fall under the class java.swing.Jframe, which is separate from java.swing.JComponent (which makes windows).
You would use a window for something larger, such as an applet, and then call a frame for smaller things, such as a pop-out player, or a GUI frame used for schedules or keeping track of things. These are just specific examples, but there are many other things you can do.
Give your answer to this question below!