johntheripper 0 Report post Posted September 4, 2006 cara2 wat garisan lurus...create new file.. GarisLurus.javadlm tu letak benda alah ni..public class GarisLurus {public static void main(String arg[]){System.out.println("----------------");}}pas tu compile dulu baru bole run...compile..yg akan menghasilkan fail GarisLurus.classjavac GarisLurus.javapas tu run la..java GarisLurustapi ni buruk nye garis lurus...klu nk wat cantek2 sket dlm applet camne arr...any ideathanx.. thanx in advance. .. Quote Share this post Link to post Share on other sites
electroboy 3 Report post Posted September 4, 2006 Guna package java.awt.geom.* untuk draw 2D lines and objects. Tgk di sini:http://java.sun.com/j2se/1.3/docs/api/java...ge-summary.htmldalam banyak2 classes tu, mayb ko nak tgk Line2D, Point2D. Try lukis satu rectangle guna satu lagi class Rectangle2D. Quote Share this post Link to post Share on other sites
johntheripper 0 Report post Posted September 4, 2006 ok..dapat..thanx 4 ur help. really appreciate it..tapi 1 g problem..skang camne nk buat graf dlm java plak..import java.applet.*import java.awt.*public class DrawLineExample extends Applet{public void paint(Graphics g){g.drawLine(0,0,500,500);}} Quote Share this post Link to post Share on other sites
unexistance 3 Report post Posted September 5, 2006 disebabkan ko pki applet, aku assume ko nk buat web..so, kalo nk bt graf, aku bg suggestion pki javascript http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm Quote Share this post Link to post Share on other sites
johntheripper 0 Report post Posted September 5, 2006 thanx...really cool website...after keep searching...aku jumpa site ni..http://java.sun.com/docs/books/tutorial/2d/index.htmltapi x jumpa la dia nye kod utk wat graf2 pie etc2 mcm dlm gambar tu...mmm camne nak wat btk camgitu...ade sampel kod x? klu bleh ade input dia...berapa data yg nk masuk etc2 Quote Share this post Link to post Share on other sites
unexistance 3 Report post Posted September 5, 2006 aku suggest jFreeCharthttp://www.jfree.org/jfreechart/ni akan simplify ko nyer development (xyh hand-code Graphics etc..) Quote Share this post Link to post Share on other sites
johntheripper 0 Report post Posted September 5, 2006 thanx...aku tau yg ni...tapi yg ni xde input output..mmg ade byk graf....tapi camne klu aku nk masukkan certain data..pas tu jadila graf Quote Share this post Link to post Share on other sites
electroboy 3 Report post Posted September 5, 2006 thanx...aku tau yg ni...tapi yg ni xde input output..mmg ade byk graf....tapi camne klu aku nk masukkan certain data..pas tu jadila grafAku pun tak pernah code complex graphs, but suppose the idea is, buat class untuk ambil input dari user (untuk dijadikan koordinat x,y ) and then store semua input dalam variables and then pass to the respective classes in the packages. Quote Share this post Link to post Share on other sites
unexistance 3 Report post Posted September 6, 2006 (edited) ok cmni la, ko install tomcat dl..pstu, ko dload jfreechart + cewolfnnt dlm cewolf nyer folder ada .war filecopy paste msuk tomcat, runctu ada demoalternatif ln, pki javascript tuh (aku ada bt utk klien )p/s: mmg jfreechart dbuat utk input output le, kalo x wtpe die bt package tuh Edited September 6, 2006 by unexistance Quote Share this post Link to post Share on other sites
azz2005 0 Report post Posted September 8, 2006 tutorial java..mcm2 ko boleh ey,unexistance..best r gitu..aku dulu ambik java gak,dpt B jer..skang dah lama tinggal.. Quote Share this post Link to post Share on other sites
unexistance 3 Report post Posted September 10, 2006 aku pon blaja jgk ms kat U, pstu lupe abis..msuk praktikal, kne pki java, blaja blk dr mula kekekeke..yg penting, kne minat... tu je Quote Share this post Link to post Share on other sites