劉任昌w3schools繪圖CANVAS與SVG
canvas繪圖套件繪製選擇權到期日損益圖 買入選擇權到期日損益 賣出選擇權到期日損益 w3schools學習canvas繪圖 Your browser does not support the HTML canvas tag. w3schools學習svg繪圖 劉任昌拷貝自w3schools 爪哇期末考 VScode安裝編輯java的延伸套件Extension pack for java import java.awt.*; import java.awt.geom.Line2D; import javax.swing.*; public class Options { public static void main(String[] args) { JFrame frame = new JFrame("柯文哲Java繪製選擇權到期日損益"); Container cp = frame.getContentPane(); cp.add(new JComponent() { public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.setFont(new Font("monospaced", Font.BOLD , 20)); g2.setColor(Color.RED); g2.setStroke(new BasicStroke(8));//stroke中風,筆觸 g2.drawString("買入賣權到期日損益",0,120); g2.draw(new Line2D.Float(0, 0, 100, 100)); g2.draw(new Line2D.Float(100, 100, 200, 100)); ...