Java Fractal Explorer [2/8]
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
▶
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
JES Image Manipulation - 2 - Installation
WilliamFiset
JES Image Manipulation - 3 - User Interface
WilliamFiset
JES Image Manipulation - 5 - Negative
WilliamFiset
JES Image Manipulation - 6 - Black & White
WilliamFiset
JES Image Manipulation - 4 - Grayscale
WilliamFiset
JES Image Manipulation - 8 - Blur
WilliamFiset
JES Image Manipulation - 7 - Edge Detection
WilliamFiset
JES Image Manipulation - 9 - Blend
WilliamFiset
JES Image Manipulation - 10 - Matte
WilliamFiset
JES Image Manipulation - 13 - Rotate90
WilliamFiset
JES Image Manipulation - 12 - Mirroring Picture
WilliamFiset
JES Image Manipulation - 11 - Crop Image
WilliamFiset
JES Image Manipulation - 14 - Stretch picture
WilliamFiset
Java Fractal Explorer [6/8]
WilliamFiset
Java Fractal Explorer [4/8]
WilliamFiset
Java Fractal Explorer [8/8]
WilliamFiset
Java Fractal Explorer [5/8]
WilliamFiset
Java Fractal Explorer [2/8]
WilliamFiset
Java Fractal Explorer [7/8]
WilliamFiset
Java Fractal Explorer [1/8]
WilliamFiset
Java Fractal Explorer [3/8]
WilliamFiset
Introduction [Programming Competition Problems]
WilliamFiset
String Manipulation 1 [Programming Competition Problems]
WilliamFiset
String Manipulation 2 [Programming Competition Problems]
WilliamFiset
Graph Theory 1 [Programming Competition Problems]
WilliamFiset
Logic 1 [Programming Competition Problems]
WilliamFiset
Grid Problems 1 [Programming Competition Problems]
WilliamFiset
Dynamic Programming 1 [Programming Competition Problems]
WilliamFiset
Introduction to Big-O
WilliamFiset
Dynamic and Static Arrays
WilliamFiset
Dynamic Array Code
WilliamFiset
Linked Lists Introduction
WilliamFiset
Doubly Linked List Code
WilliamFiset
Stack Introduction
WilliamFiset
Stack Implementation
WilliamFiset
Stack Code
WilliamFiset
Queue Introduction
WilliamFiset
Queue Implementation
WilliamFiset
Queue Code
WilliamFiset
Priority Queue Introduction
WilliamFiset
Priority Queue Min Heaps and Max Heaps
WilliamFiset
Priority Queue Inserting Elements
WilliamFiset
Priority Queue Removing Elements
WilliamFiset
Priority Queue Code
WilliamFiset
Union Find Introduction
WilliamFiset
Union Find Kruskal's Algorithm
WilliamFiset
Union Find - Union and Find Operations
WilliamFiset
Union Find Path Compression
WilliamFiset
Union Find Code
WilliamFiset
Binary Search Tree Introduction
WilliamFiset
Binary Search Tree Insertion
WilliamFiset
Binary Search Tree Removal
WilliamFiset
Binary Search Tree Traversals
WilliamFiset
Binary Search Tree Code
WilliamFiset
Fenwick Tree range queries
WilliamFiset
Fenwick Tree point updates
WilliamFiset
Fenwick Tree construction
WilliamFiset
Fenwick tree source code
WilliamFiset
Hash table hash function
WilliamFiset
Hash table separate chaining
WilliamFiset
More on: API Design
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
Bloom Filters, Explained Properly
Dev.to · Daksh Gargas
Prefix Sums: The Preprocessing Trick That Makes Range Queries Instant
Medium · Programming
I Thought I Was Ready for the Interview — Then One Simple Math Question Destroyed Me
Medium · Programming
Week 2(Day 10): LeetCode Two Pointers(slow & fast): Remove Duplicates from Sorted Array (Brute…
Medium · Python
🎓
Tutor Explanation
DeepCamp AI