GRAFIKA KOMPUTER ANIMASI MENGGUNAKAN NETBEANS
ANIMASI MENGGUNAKAN SOURCE CODE NETBEANS BERIKUT SOURCE CODENYA import java.awt.*; import java.awt.event.*; import javax.swing.*; public final class bola extends JFrame { private JPanel jp; private Timer timer; public bola() { initComponents(); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.pack(); this.setLocationByPlatform(true); timer.start(); } public void initComponents() { ActionListener al = (ActionEvent evt) -> { jp.repaint(); }; timer = new Timer(10,al); jp = new JPanel() { int x; int y; int xspeed = 1; int yspeed = 1; Dimension preferredSize = new Dimension(500, 300); @Override public Dimension getPreferredSize() { return preferredSize; } @Override public void paintComponent(Graphics g) { super.paintComponent(g); this.move(); Graphics2D g2 = (Graphics2D)g; g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_A...
