dhuha, you've been told about using code tags when you posted in this thread. I've added them for you, but you have to form a habit of reading responses to your posts and learning from them.
A file can contain only one public class, and a public class must be in a file with a name that matches the class name. Your SwingApplet code needs to be in a file named SwingApplet.java.
What are you trying to do with a JFrame class and a JApplet class together anyways?
luck, db
There are no new questions, but there may be new answers.
dhuha al khoiri
Greenhorn
Joined: Apr 17, 2012
Posts: 24
posted
0
i try to make swing applet,so i combine code from applet that i was learn before from my lecturer,and that code is JApplet class
and my code is Jframe,so i combined it, and hope can make a new code,that have a swing applet in it,is it right? or is it wrong?
so how come if i want to make an applet,but have a swing feature? i dunno
and about my habit,forgot to use code tags,i don't know to use it in this forum
where i can find codetags?and what button should i click? how i can make it,like you did?
explain it to me...
thanks,and sorry for my mistake,because i did'nt know to use code tags
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
A Java source file can have only one public class. You'll need to move that class to its own source file.
dhuha al khoiri wrote:and about my habit,forgot to use code tags,i don't know to use it in this forum
where i can find codetags?and what button should i click? how i can make it,like you did?
explain it to me...
Maneesh gave you a link in the other thread I posted a link to here, but since you didn't see it there, I'll give it to you again: UseCodeTags<-- link
dhuha al khoiri
Greenhorn
Joined: Apr 17, 2012
Posts: 24
posted
0
thanks for all of you,this forum so amazing!
you guys are really help me..
thank you so much,and if i have another question,i will ask again in this forum