Explain about drawing lines, JAVA Programming

Assignment Help:

Explain about Drawing Lines?

Drawing straight lines along with Java is easy. Just call
g.drawLine(x1, y1, x2, y2)
where (x1, y1) and (x2, y2) are the endpoints of your lines and g is the Graphics object you're drawing along with.
This program draws a line diagonally across the applet.
import java.applet.*;
import java.awt.*;

public class SimpleLine extends Applet {

public void paint(Graphics g) {

g.drawLine(0, 0, this.getSize().width, this.getSize().height);

}

}
Here's the result

 


Related Discussions:- Explain about drawing lines

Implement the list calss, Your next task is to implement the MovieList clas...

Your next task is to implement the MovieList class that manages the details for a list of DVD Movies read from the specified data file. The constructor will include a parameter tha

Action listener and event listener, differende between action listener and ...

differende between action listener and event listener

Explanation of EM algorithm, try { pa="weblog"; pa...

try { pa="weblog"; pas="weblog"; Connection c; Statement st;

OOP, differentiate between states and behaviors of n object

differentiate between states and behaviors of n object

I clicker, i am to find 75% of i clicker score.Each correct answer is worth...

i am to find 75% of i clicker score.Each correct answer is worth 2points and an incorrect 1point. Express grade as a percentage (i.e the max is 100%). e.g 1 no i clicker question

Develop a desktop chatbot application, Develop a desktop Chatbot applicatio...

Develop a desktop Chatbot application Project Description: Looking for an in depth and smart working chatbot Seeking someone with skills working with AI and chatbots and t

Time date millis method, I neeed to create a basic code to do the following...

I neeed to create a basic code to do the following. the class is entry level and I would appreciate a brief explanation as to why you do each bit. Write a program that displays t

Write a program to explain do while loop in java, Write a program to explai...

Write a program to explain do while loop in Java ? // This is the Hello program in Java class Hello { public static void main (String args[]) { int i = -1; do { if (

Project, Hey, i have a project on java can you help me

Hey, i have a project on java can you help me

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd