Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Creating a javadoc help please.

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Creating a javadoc help please.

    I am trying to implement a class in java. I have to create a javadoc from the code I am writing. However, I am having trouble getting the Field Summary section to show up in the javadoc. Thanks in advance. Sorry if this isn't posted correctly it's my first post.

    Here is my Code:


    package linesegmenttesterapp;


    public class LineSegment
    {
    /**
    * The X coordinate of the start point of the line segment.
    */
    private double x1;

    /**
    * The X coordinate of the end point of the line segment.
    */
    private double x2;

    /**
    * The Y coordinate of the start point of the line segment.
    */
    private double y1;

    /**
    * The Y coordinate of the end point of the line segment.
    */
    private double y2;

    /**
    * Constructs and initializes a Line with coordinates (0,0)->(0,0).
    */
    public LineSegment()
    {
    x1 = 0;
    y1 = 0;
    x2 = 0;
    y2 = 0;
    }

    /**
    * Constructs and initializes a Line2D from the specified coordinates.
    * @param x1Val, y1Val, x2Val, y2Val
    */
    public LineSegment(double x1Val, double y1Val, double x2Val, double y2Val)
    {
    x1 = x1Val;
    y1 = y1Val;
    x2 = x2Val;
    y2 = y2Val;

    }

    }


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Creating a javadoc help please.

    What exactly do you mean? It might be because you aren't generating javadoc for private members.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Mar 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Creating a javadoc help please.

    Like when you look at java api you will see a field summary section. In my code it should display all the 'private double variables', however it is not. I am currently using netbeans IDE. So how would i get the private variables to display in my javadoc? Is there an option in netbeans to show private variables? Thanks for the reply

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Creating a javadoc help please.

    I am not familiar enough with netbeans to give you a step by step guide, but I would imagine this is a pretty google-able problem. You might test my theory by making one of the variables public and one of the methods private and seeing what shows up in the javadoc then. If that confirms my guess, then you might want to google things like "netbeans javadoc show private members".
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. The Following User Says Thank You to KevinWorkman For This Useful Post:

    jerryg (March 8th, 2012)

  6. #5
    Junior Member
    Join Date
    Mar 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Creating a javadoc help please.

    Thanks I will give it a try when I get to my home computer! I was having trouble finding a solution through google, but that is probably because I wasn't sure how to word the question. I think I will be able to handle it from here though. Thanks again!

  7. #6
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Creating a javadoc help please.

    Found something promising after googling "netbeans generate javadoc for private members" that seems to confirm my guess: NetBeans Forums - Generating JavaDocs
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  8. #7
    Junior Member
    Join Date
    Mar 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Creating a javadoc help please.

    Looks like what I need. Thanks Again!

Similar Threads

  1. Double always == 0! And a Javadoc issue! (Using NetBeans)
    By CameronFaust in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 11th, 2011, 12:22 AM
  2. Creating and implementing class for creating a calendar object
    By kumalh in forum Object Oriented Programming
    Replies: 3
    Last Post: July 29th, 2011, 08:40 AM
  3. Ok to post Javadoc related beta invite?
    By innovasys in forum Member Introductions
    Replies: 2
    Last Post: July 14th, 2011, 08:59 AM
  4. [SOLVED] Creating a .jar that uses a DB
    By mycallsevern in forum JDBC & Databases
    Replies: 2
    Last Post: May 8th, 2011, 10:43 AM
  5. How do you generate javadoc?
    By javapenguin in forum Java IDEs
    Replies: 15
    Last Post: November 27th, 2010, 09:12 PM