On Nov 11, 2:51 pm, Mark Space <marksp...@sbc.global.net> wrote:
zf...@yahoo.com wrote:
I even more confused now. Where does your sscce come from? I do not
see any references to JFrame in the example on
http://java.sun.com/javase/6/docs/api/javax/swing/package-summary.htm...
Here's cut and paste from that link:
-----
public class MyApp implements Runnable {
public void run() {
// Invoked on the event dispatching thread.
// Construct and show GUI.
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new MyApp(args));
}}
-----
See the comment where it says "GUI?" That means JFrame and friends. Try
clicking on the link at the bottom of that page where it says "Swing
Tutorial."
I do know what JFrame is. I did click on that link and everything
there looked just fine to me, including the examples. That is why I
asked Andrew what was wrong with the example. Andrew then replied
with a completely different example, in which MyApp extends JFrame.
The example on the Java docs page MyApp does not extend anything.
(Well, extends Object, but Object does not have show().)
Eugene
new MyApp().show(), which looks like it belongs to a JFrame object. In
a GUI context, thats not an unreasonable assumption. Thats why its
you think is appropriate.