This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.File; | |
| import javafx.application.*; | |
| import javafx.geometry.*; | |
| import javafx.scene.*; | |
| import javafx.scene.control.*; | |
| import javafx.scene.layout.*; | |
| import javafx.scene.image.*; | |
| import javafx.stage.*; | |
| public class Master extends Application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package edu.govschool; | |
| import java.io.File; | |
| import javafx.application.*; | |
| import javafx.scene.*; | |
| import javafx.scene.control.*; | |
| import javafx.scene.image.*; | |
| import javafx.scene.layout.*; | |
| import javafx.scene.media.*; | |
| import javafx.stage.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * New packages to import | |
| */ | |
| import javafx.scene.image.*; | |
| // Add this code where you want your image to appear | |
| File imageFile = new File("C:\\Path\\To\\Image\\File.jpg"); | |
| Image image = new Image(imageFile.toURI().toString()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Assume that the modal confirmation box is in the normal package | |
| * These are extra packages you need to import | |
| */ | |
| import edu.govschool.modals.*; | |
| import javafx.scene.media.*; | |
| import java.io.File; | |
| // Add this code to your code that's called when you want | |
| // the audo file to play |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javafx.application.*; | |
| import javafx.stage.*; | |
| import javafx.scene.*; | |
| import javafx.scene.layout.*; | |
| import javafx.scene.control.*; | |
| public class ClickCounter extends Application | |
| { | |
| private static Button btn; | |
| private static Label lbl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| import java.text.DecimalFormat; | |
| import java.io.FileWriter; | |
| import java.io.IOException; | |
| public class ProjectileWriteToFile | |
| { | |
| public static void main(String[] args) | |
| { | |
| System.out.println("Modeling Projectile Motion"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LinkedList | |
| { | |
| private Node head; | |
| private Node tail; | |
| public LinkedList() | |
| { | |
| head = null; | |
| tail = null; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class LinkedListTest | |
| { | |
| public static void Menu() | |
| { | |
| System.out.println("1 - Insert At Back"); | |
| System.out.println("2 - Quit"); | |
| System.out.println("3 - Insert At Front"); | |
| System.out.println("4 - Remove From Front"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // As before, the T signifies the type we're storing. | |
| public class LinkedList<T> | |
| { | |
| private Node<T> head; | |
| private Node<T> tail; | |
| public LinkedList() | |
| { | |
| head = null; | |
| tail = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // The <T> after the class name tells Java that this class | |
| // uses generics. During program execution, the T will be replaced | |
| // with the class being stored. | |
| public class Node<T> | |
| { | |
| // Since our data is the thing we're storing, we'll | |
| // set it's type to T. | |
| private T data; | |
| private Node next; | |
NewerOlder