Postingan

Menampilkan postingan dari Desember, 2017

FP PBO :Calendar viewer

Gambar
Berikut Ini adalah source codenya //Import packages import javax.swing.*; import javax.swing.event.*; import javax.swing.table.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class ViewCalendar {      JLabel lblMonth, lblYear;      JButton btnPrev, btnNext;      JTable tblCalendar;      JComboBox cmbYear;      JFrame frmMain;      Container pane;      DefaultTableModel mtblCalendar; //Table model      JScrollPane stblCalendar; //The scrollpane      JPanel pnlCalendar;      int realYear, realMonth, realDay, currentYear, currentMonth;     public void viewCalendar() {         System.out.println("*Calendar open*");         //Look and feel         try {             UIManager.setLookAnd...

PONG,Game pong

Class Renderer  package pong;   import java.awt.Graphics;   import java.awt.Graphics2D;   import javax.swing.JPanel;   public class Renderer extends JPanel   {        private static final long serialVersionUID = 1L;        @Override        protected void paintComponent(Graphics g)        {             super.paintComponent(g);             Pong.pong.render((Graphics2D) g);        }   }  Class Paddle  package pong;    import java.awt.Color;    import java.awt.Graphics;    public class Paddle    {         public int paddleNumber;         public int x, y, width = 50, height = 250;         publi...