Results 1 to 5 of 5
  1. #1
    lams_007 is offline Member
    Join Date
    Jan 2013
    Location
    Mexico, D.F
    Posts
    2
    Rep Power
    0

    Default 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 don’t 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
    Java 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
    app1.bmp
    thanks for the help

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,531
    Rep Power
    5

    Default Re: very noob question

    You should not translate the method names. The method is called paint(), not pintar() :)

  3. #3
    lams_007 is offline Member
    Join Date
    Jan 2013
    Location
    Mexico, D.F
    Posts
    2
    Rep Power
    0

    Default 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

  4. #4
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,531
    Rep Power
    5

    Default Re: very noob question

    No worries. Just don't go out and translate everything. You'll be fine :)

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,312
    Blog Entries
    7
    Rep Power
    25

    Default Re: very noob question

    Cute mistake; especially for a language that does its utmost to be multi lingual ...

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

Similar Threads

  1. noob question!
    By swp in forum New To Java
    Replies: 5
    Last Post: 09-28-2011, 11:14 PM
  2. noob question. plz help tho!
    By swp in forum New To Java
    Replies: 2
    Last Post: 09-28-2011, 06:16 AM
  3. Probably Really Noob Question
    By bpx95 in forum New To Java
    Replies: 2
    Last Post: 05-16-2011, 01:44 AM
  4. Question - I'm a noob!
    By Insaeno in forum New To Java
    Replies: 5
    Last Post: 08-04-2008, 03:20 AM
  5. Noob question- easy
    By mattonitto in forum New To Java
    Replies: 7
    Last Post: 06-13-2008, 12:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •