Posts

Membuat Aplikasi POS Sederhana

class pembelian import   javafx.application.Application ; import   javafx.application.Platform ; import   javafx.event.ActionEvent ; import   javafx.event.EventHandler ; import   javafx.geometry.Insets ; import   javafx.geometry.Pos ; import   javafx.scene.Scene ; import   javafx.scene.control.* ; import   javafx.scene.layout.* ; import   javafx.scene.text.Font ; import   javafx.scene.text.Text ; import   javafx.stage.Stage ; import   javafx.scene.layout.StackPane ; import   javafx.collections.* ; import   javafx.scene.paint.* ; import   javafx.scene.text.* ; import   javafx.scene.Group ; import   java.util.Random ;   public   class  Cetak {      private  Text NamaBarang  =   new  Text ( "" ) , TotalHargaText  =   new  Text ( "" ) ;      private   String  jumlahBeli ;      public  Cetak ( Text namaBarang,  String  jumlah, Text TotalHarga )      {         NamaBarang  =  namaBarang ;    

Java Applet

1. Java Applet 2. JavaFX

Image Viewer

1. Class OFImage /** * @Marsha Nabilah */ import java.awt.*; import java.awt.image.*; import javax.swing.*; public class OFImage extends BufferedImage { /** * Create an OFImage copied from a BufferedImage. * @param image The image to copy. */ public OFImage(BufferedImage image) { super(image.getColorModel(), image.copyData(null), image.isAlphaPremultiplied(), null); } /** * Create an OFImage with specified size and unspecified content. * @param width The width of the image. * @param height The height of the image. */ public OFImage(int width, int height) { super(width, height, TYPE_INT_RGB); } /** * Set a given pixel of this image to a specified color. The * color is represented as an (r,g,b) value. * @param x The x position of the pixel. * @param y The y position of the pixel. * @param col The color of the pixel. */

Evaluasi Tengah Semester

Image
1. Class Main import java.util.Scanner ;    public   class  main   {         public   static  void main ( String  args [ ] )         {            Scanner scan =  new Scanner ( System.in ) ;            int menu ;         System.out.println ( "Menu" ) ;         System.out.println ( "" ) ;            System.out.println ( "1. Pulsa" ) ;            System.out.println ( "2. Online Shop" ) ;            System.out.println ( "3. Tiket Kereta Api" ) ;            System.out.println ( "4. Tiket Pesawat" ) ;         System.out.println ( "5. Tiket Konser" ) ;         System.out.println ( "6. I-DELIVERY" ) ;                 menu  =  scan.nextInt ( ) ;         switch ( menu )          {             case  1 :             BeliPulsa pulsa  =  new BeliPulsa ( ) ;             pulsa.beliPulsa ( ) ;             break ;                case  2 :