Java Fractal Explorer [2/8]

WilliamFiset · Intermediate ·⚡ Algorithms & Data Structures ·11y ago
Skills: API Design50%
Git video snapshots: https://github.com/william-fiset/FractalExplorer/commits/master =============================================================================== Developer tools I used in the creation/testing of the content in these videos: 1) Sublime text, my favorite lightweight code editor (https://www.sublimetext.com). NOTE: I'm often asked about the color scheme I use, find it here: https://github.com/williamfiset/dotfiles/tree/master/sublime 2) Kite, a free AI-powered coding assistant that provides smart code completions while typing: https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=williamfiset&utm_content=description-only ===============================================================================

What You'll Learn

The video demonstrates the creation of a Java fractal explorer using Sublime text, Atom, and GitHub, covering the setup of a workspace, creation of a Java file, and initialization of a graphical user interface using Java Swing.

Full Transcript

hello everyone welcome to your very first fractal Explorer tutorial the first thing we're going to do is we are going to create a workspace for our fractal Explorer uh my workspace is going to be in a GitHub folder um so if you want to create one just right click hit new folder and you see I already have a bunch of projects going on but one of those projects is the fractal Explorer now I have some template files right here that you don't need to worry about um so next step is going to be to open one of your favorite editors um here I have atom open you can create a new file by hitting command n now save this file in your workspace um let's see m is on GitHub fral Explorer name the file fractal explorer. Java so the first thing we're going to do is we're going to put a header oops and in this header put something like a fractal Explorer created in Java and put your name okay so let's get started so I'm going to import all the Imports we're going to need for this series so we're going to need java.util oops we're also going to need need java. awt star we're also going to need Java awt image we're going to be using the buffered image um we're also going to be using event for Mouse clicks and keyboard strokes and so on and we're going to be using Java X swing for gooey components to create the graphical user interface since we named this file fractal Explorer that's going to be the name our class so public class fractal Explorer and we're going to make this be a jframe so make sure you have extends jframe here so the first thing we're going to do is we're going to call the main method and the main method is going to create a new instance of the fractal Explorer so new fractal Explorer like that and that's going to call the instructor so let's create a Constructor and the Constructor is where we are going to initialize um our guey and for this this first video all I want to do is have a canvas that pops up on the screen so let's do that um set initial gooey properties I think that method is pretty self-explanatory um it's just going to set some properties for guey um but before we do that let's create some instance variables for the width and the height of our canvas um width let's make the width 600 let's make the height also 600 there you go so now I'm just going to list a bunch of properties and explain what they do afterwards okay so what do all these properties mean well this first one sets the title of our graphical user interface to fractal Explorer set default close operation is a method which determines how our window will close the option JF frame. exit on close ensures that when we click the x button of our window the window closes naturally as you would expect set size just sets the size of the guey so it's going to be 600 by 600 set resizable locks locks the frame so that we can't actually resize it and we don't want this just because we're going to have a canvas on top of it and we would rather that stay fixed set relative location 2 and null makes sure that when our guey is created that is placed in the center of the screen and set visible makes makes everything visible so let's run this and see if it works so open up your terminal and my workspace was on the desktop in the GitHub folder INF fral Explorer um so I'm going to compile my my fractal Explorer video and we don't have any errors and let's see if it runs and indeed it does and we get a simple graphical user interface with nothing on it as expected and this is the title we set and and the size is 600 by 600 and if we click the the Red X at the top left corner our gooey exits and this is all I wanted to do for the first video is just get a frame on the screen and get everything started so guys thank you for watching and see you in the next tutorial thank you
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from WilliamFiset · WilliamFiset · 18 of 60

1 JES Image Manipulation - 2 - Installation
JES Image Manipulation - 2 - Installation
WilliamFiset
2 JES Image Manipulation - 3 - User Interface
JES Image Manipulation - 3 - User Interface
WilliamFiset
3 JES Image Manipulation - 5 - Negative
JES Image Manipulation - 5 - Negative
WilliamFiset
4 JES Image Manipulation - 6 - Black & White
JES Image Manipulation - 6 - Black & White
WilliamFiset
5 JES Image Manipulation - 4 - Grayscale
JES Image Manipulation - 4 - Grayscale
WilliamFiset
6 JES Image Manipulation - 8 - Blur
JES Image Manipulation - 8 - Blur
WilliamFiset
7 JES Image Manipulation - 7 - Edge Detection
JES Image Manipulation - 7 - Edge Detection
WilliamFiset
8 JES Image Manipulation - 9 - Blend
JES Image Manipulation - 9 - Blend
WilliamFiset
9 JES Image Manipulation - 10 - Matte
JES Image Manipulation - 10 - Matte
WilliamFiset
10 JES Image Manipulation - 13 - Rotate90
JES Image Manipulation - 13 - Rotate90
WilliamFiset
11 JES Image Manipulation - 12 - Mirroring Picture
JES Image Manipulation - 12 - Mirroring Picture
WilliamFiset
12 JES Image Manipulation - 11  - Crop Image
JES Image Manipulation - 11 - Crop Image
WilliamFiset
13 JES Image Manipulation - 14 - Stretch picture
JES Image Manipulation - 14 - Stretch picture
WilliamFiset
14 Java Fractal Explorer [6/8]
Java Fractal Explorer [6/8]
WilliamFiset
15 Java Fractal Explorer [4/8]
Java Fractal Explorer [4/8]
WilliamFiset
16 Java Fractal Explorer [8/8]
Java Fractal Explorer [8/8]
WilliamFiset
17 Java Fractal Explorer [5/8]
Java Fractal Explorer [5/8]
WilliamFiset
Java Fractal Explorer [2/8]
Java Fractal Explorer [2/8]
WilliamFiset
19 Java Fractal Explorer [7/8]
Java Fractal Explorer [7/8]
WilliamFiset
20 Java Fractal Explorer [1/8]
Java Fractal Explorer [1/8]
WilliamFiset
21 Java Fractal Explorer [3/8]
Java Fractal Explorer [3/8]
WilliamFiset
22 Introduction [Programming Competition Problems]
Introduction [Programming Competition Problems]
WilliamFiset
23 String Manipulation 1 [Programming Competition Problems]
String Manipulation 1 [Programming Competition Problems]
WilliamFiset
24 String Manipulation 2 [Programming Competition Problems]
String Manipulation 2 [Programming Competition Problems]
WilliamFiset
25 Graph Theory 1 [Programming Competition Problems]
Graph Theory 1 [Programming Competition Problems]
WilliamFiset
26 Logic 1 [Programming Competition Problems]
Logic 1 [Programming Competition Problems]
WilliamFiset
27 Grid Problems 1 [Programming Competition Problems]
Grid Problems 1 [Programming Competition Problems]
WilliamFiset
28 Dynamic Programming 1 [Programming Competition Problems]
Dynamic Programming 1 [Programming Competition Problems]
WilliamFiset
29 Introduction to Big-O
Introduction to Big-O
WilliamFiset
30 Dynamic and Static Arrays
Dynamic and Static Arrays
WilliamFiset
31 Dynamic Array Code
Dynamic Array Code
WilliamFiset
32 Linked Lists Introduction
Linked Lists Introduction
WilliamFiset
33 Doubly Linked List Code
Doubly Linked List Code
WilliamFiset
34 Stack Introduction
Stack Introduction
WilliamFiset
35 Stack Implementation
Stack Implementation
WilliamFiset
36 Stack Code
Stack Code
WilliamFiset
37 Queue Introduction
Queue Introduction
WilliamFiset
38 Queue Implementation
Queue Implementation
WilliamFiset
39 Queue Code
Queue Code
WilliamFiset
40 Priority Queue Introduction
Priority Queue Introduction
WilliamFiset
41 Priority Queue Min Heaps and Max Heaps
Priority Queue Min Heaps and Max Heaps
WilliamFiset
42 Priority Queue Inserting Elements
Priority Queue Inserting Elements
WilliamFiset
43 Priority Queue Removing Elements
Priority Queue Removing Elements
WilliamFiset
44 Priority Queue Code
Priority Queue Code
WilliamFiset
45 Union Find Introduction
Union Find Introduction
WilliamFiset
46 Union Find Kruskal's Algorithm
Union Find Kruskal's Algorithm
WilliamFiset
47 Union Find - Union and Find Operations
Union Find - Union and Find Operations
WilliamFiset
48 Union Find Path Compression
Union Find Path Compression
WilliamFiset
49 Union Find Code
Union Find Code
WilliamFiset
50 Binary Search Tree Introduction
Binary Search Tree Introduction
WilliamFiset
51 Binary Search Tree Insertion
Binary Search Tree Insertion
WilliamFiset
52 Binary Search Tree Removal
Binary Search Tree Removal
WilliamFiset
53 Binary Search Tree Traversals
Binary Search Tree Traversals
WilliamFiset
54 Binary Search Tree Code
Binary Search Tree Code
WilliamFiset
55 Fenwick Tree range queries
Fenwick Tree range queries
WilliamFiset
56 Fenwick Tree point updates
Fenwick Tree point updates
WilliamFiset
57 Fenwick Tree construction
Fenwick Tree construction
WilliamFiset
58 Fenwick tree source code
Fenwick tree source code
WilliamFiset
59 Hash table hash function
Hash table hash function
WilliamFiset
60 Hash table separate chaining
Hash table separate chaining
WilliamFiset

This video teaches how to create a basic Java fractal explorer using Java Swing, covering the setup of a workspace, creation of a Java file, and initialization of a graphical user interface.

Key Takeaways
  1. Create a new GitHub folder for the project
  2. Open a code editor (e.g. Sublime text, Atom) and create a new Java file
  3. Import necessary Java libraries (e.g. java.util, java.awt)
  4. Create a new JFrame and set its properties (e.g. title, size, default close operation)
💡 Using Java Swing for GUI development allows for easy creation of graphical user interfaces in Java.

Related AI Lessons

Bloom Filters, Explained Properly
Learn how Bloom filters work and their benefits, including tiny memory and blazing speed, in exchange for potential false positives.
Dev.to · Daksh Gargas
Prefix Sums: The Preprocessing Trick That Makes Range Queries Instant
Learn how prefix sums enable instant range queries in arrays, boosting performance in various applications
Medium · Programming
I Thought I Was Ready for the Interview — Then One Simple Math Question Destroyed Me
A simple math question can destroy a developer's interview, highlighting the importance of being prepared for unexpected questions
Medium · Programming
Week 2(Day 10): LeetCode Two Pointers(slow & fast): Remove Duplicates from Sorted Array (Brute…
Learn to remove duplicates from a sorted array using the two pointers technique, improving from brute force to optimized solutions
Medium · Python
Up next
The illusion of originality | Lyra Wells | TEDxLuxembourgCity
TEDx Talks
Watch →