-
1 Attachment(s)
very noob question
Hello this is my first post, I am really new to java programing, but I know C/C++ no it a very high level but I am intermediate C/C++.
I am writing a program to learn how to use java Itīs compiling I thinks itīs what they call an applet or something like that, like I said the code compiles and run but I dont see any output of the code or I donīt see the output it should be doing, I thinks thereīs a problem not in the compiler but at the time I am executing the program, I am using jre7 and eclipse on windows.
Hereīs the code
Code:
import javax.swing.JApplet;
import java.awt.Graphics;
public class graficos extends JApplet{
public void pintar(Graphics g)
{
g.drawString("Learnig to programa JAVA",25,25);
g.drawString("Migrating to Java from C and C++",25,40);
}
}
Ant hereīs the output
Attachment 4430
thanks for the help
-
Re: very noob question
You should not translate the method names. The method is called paint(), not pintar() :)
-
Re: very noob question
Wow thanks for that fast answer and it worked :-D, sorry about that very noob question I actually havenīt understood very well all that method and classes
Thanks :-D
-
Re: very noob question
No worries. Just don't go out and translate everything. You'll be fine :)
-
Re: very noob question
Cute mistake; especially for a language that does its utmost to be multi lingual ...
kind regards,
Jos