Posts

Showing posts from November, 2019

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. */