We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,379 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

g.drawLine(x1, y1, x2, y2)

Good Day i just wanted to ask what does (x1, y1, x2, y2) in g.drawLine in creating a line in java applet.. thanks in advance

3
Contributors
3
Replies
15 Minutes
Discussion Span
7 Months Ago
Last Updated
6
Views
Question
Answered
gelmi
Newbie Poster
20 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

I don't get what you're asking...

nmaillet
Posting Pro
537 posts since Aug 2008
Reputation Points: 111
Solved Threads: 103
Skill Endorsements: 4

oops sorry.. what does x1, y1, x2 y2 means? in g.drawLine(x1, y1, x2, y2)

gelmi
Newbie Poster
20 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Every parameter of every public method of every Java API class is documented in the API documentation, and learning to use it is an absolutely essential skill for Java prgrammers
http://docs.oracle.com/javase/7/docs/api/

for drawLine it says

> public abstract void drawLine(int x1,
>             int y1,
>             int x2,
>             int y2)
> 
> Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics context's coordinate system.
> 
> Parameters:
>     x1 - the first point's x coordinate.
>     y1 - the first point's y coordinate.
>     x2 - the second point's x coordinate.
>     y2 - the second point's y coordinate.
JamesCherrill
... trying to help
Moderator
8,525 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,456
Skill Endorsements: 30
Question Answered as of 7 Months Ago by JamesCherrill and nmaillet

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0738 seconds using 2.73MB