desenhoLinha

by teste on February 23rd, 2012
No notes
Syntax: Java
Show lines - Hide lines - Show in textbox - Download
package rsjuliao;
 
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Line2D;
 
import javax.swing.JFrame;
 
public class Teste extends JFrame{
	private static final long serialVersionUID = 2507706525784405524L;
 
 
	public static void main(String args[]){
		Teste t = new Teste();
		t.show(true);		
	}
 
 
	@Override
	public void paint(Graphics graph) {
		super.paint(graph);
		Graphics2D graph2D = (Graphics2D)graph;
 
		graph2D.draw(new Line2D.Double(0, 0, 100, 100));
	}
}
 

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS