Images in AWT frame
how can I put an image in an AWT frame that is run outside of an applet?
Heres the code for my frame:
Frame f=new Frame("Music Info:");
f.setVisible( true );
TextArea textArea=new TextArea("Come Clarity by In Flames",2,30);
Just curious, why AWT and not Swing? One reason for the question: I know Swing but really don't know AWT, and from what I know, most don't use it as much.
im using AWT because I am being taught in that form. I have no idea how to use swing and I dont have the time to relearn java.
From your question
> how can I put an image in an AWT frame that is run outside of an applet?
I'll have to guess that you do know how to put an image in an Applet.
For a standalone AWT application, you would use a Canvas and override paint(Graphics g) in exactly the same way as for an Applet. Then add the Canvas to the Frame, using an appropriate Layout Manager.
And if you're spending money to be taught AWT and not Swing, you're being ripped off. AWT is legacy. Swing has been around long enough that it should be used for all new applications.
Not a huge thing to learn Swing lol. Just read about Swing on the Suns' official web site. Java Swing
Originally Posted by Urgle