<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Collins Chinedu on Medium]]></title>
        <description><![CDATA[Stories by Collins Chinedu on Medium]]></description>
        <link>https://medium.com/@dwoogames9?source=rss-7113368230a9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7EwO3dchGobPq72ym5XuVQ@2x.jpeg</url>
            <title>Stories by Collins Chinedu on Medium</title>
            <link>https://medium.com/@dwoogames9?source=rss-7113368230a9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 11:15:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dwoogames9/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JavaFX: The Modern Way to Build Desktop Apps in Java]]></title>
            <link>https://medium.com/@dwoogames9/javafx-the-modern-way-to-build-desktop-apps-in-java-f1fd97d5a243?source=rss-7113368230a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1fd97d5a243</guid>
            <category><![CDATA[desktop-app]]></category>
            <category><![CDATA[javafx]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Collins Chinedu]]></dc:creator>
            <pubDate>Sat, 03 Oct 2026 05:07:51 GMT</pubDate>
            <atom:updated>2026-10-03T05:07:51.512Z</atom:updated>
            <content:encoded><![CDATA[<p>A beginner-friendly guide to what JavaFX is, how it works, and how to build your first app.</p><p>If you’ve ever wanted to build a real desktop application in Java, one with buttons, tables, charts, animations and a polished look, JavaFX is the toolkit you should know about. It’s modern, actively maintained, and runs on Windows, macOS and Linux from a single codebase.</p><p>This guide covers what JavaFX is, how it works, and how to get started.</p><p>What Is JavaFX?</p><p>JavaFX is an open-source toolkit for building rich graphical user interfaces (GUIs) in Java. It handles everything you’d expect from a desktop app: windows, controls, layouts, styling, media playback, charts and animation.</p><h3>History of JavaFX</h3><p>During my research, I found out that JavaFX was launched in 2008 by Sun Microsystems.</p><p>It was designed to give Java developers a better way to build applications that aren’t just functional, but also visual and interactive.</p><p>JDK 8 arrived overtime as JavaFX became more important. But when JDK 8 arrived something interesting happened it came together with Java itself. Think of it like buying a new phone and discovering that an important app is already installed. You install the JDK and JavaFX is already there. JavaFX becomes part of the standard Java development experience.</p><p>Eventually, Java’s ecosystem starts changing we had Java 9, Java 10, and then Java 11 arrive. And in Java 11, something important happened. JavaFX is removed from the JDK.</p><p>At first, that might sound like JavaFX was abandoned.But that’s not what happened.</p><p>Instead, JavaFX became its own separate project.</p><p>So now the relationship looked more like this:</p><p>(Java → JDK)</p><p>(JavaFX → separate project)</p><p>You could still use JavaFX but you just had to obtain it separately.</p><p>And Today: It’s maintained as OpenJFX by the open-source community, with Gluon playing a leading role, and it continues to get regular releases</p><p>Many people assume JavaFX is dead because it left the JDK. It isn’t. It simply moved to its own release cycle.</p><p>And that’s where you are today</p><p>When you’re learning:</p><p>Stage</p><p>Scene</p><p>Button</p><p>Label</p><p>VBox</p><p>HBox</p><p>GridPane</p><p>FlowPane</p><h3>The Core Idea: The Scene Graph</h3><p>Every JavaFX interface is built as a tree of nodes called the scene graph:</p><p>Stage: the window itself</p><p>Scene: the content inside the window</p><p>Layouts: containers like VBox, HBox and GridPane that arrange things</p><p>Controls: the actual UI elements, like Button, Label and TableView</p><p>You build this tree, and JavaFX renders it. Once you understand this structure, the rest of the framework clicks into place.</p><h3><strong>Your First JavaFX App</strong></h3><p>Here’s a small app with a button and a label:</p><pre>import javafx.application.Application;<br>import javafx.scene.Scene;<br>import javafx.scene.control.Button;<br>import javafx.scene.control.Label;<br>import javafx.scene.layout.VBox;<br>import javafx.stage.Stage;<br><br>public class HelloApp extends Application {<br><br>    private int clicks = 0;<br><br>    @Override<br>    public void start(Stage stage) {<br>        Label label = new Label(&quot;Clicked 0 times&quot;);<br>        Button button = new Button(&quot;Click me&quot;);<br><br>        button.setOnAction(e -&gt; {<br>            clicks++;<br>            label.setText(&quot;Clicked &quot; + clicks + &quot; times&quot;);<br>        });<br><br>        VBox root = new VBox(10, label, button);<br>        stage.setScene(new Scene(root, 300, 200));<br>        stage.setTitle(&quot;My First JavaFX App&quot;);<br>        stage.show();<br>    }<br><br>    public static void main(String[] args) {<br>        launch(args);<br>    }<br>}</pre><p>The start method is where you build your UI, and launch boots the application.</p><h3><strong>Layouts: Let JavaFX Do the Positioning</strong></h3><p>Instead of placing every element by pixel, you describe the structure and JavaFX handles the sizing and resizing. The most common layouts are:</p><p><strong>VBox / HBox</strong>: stack children vertically or horizontally</p><p><strong>GridPane</strong>: arrange children in rows and columns</p><p><strong>BorderPane</strong>: top, bottom, left, right and center regions</p><p><strong>StackPane</strong>: layer children on top of each other</p><p>Nesting these gives you almost any design, and it resizes gracefully with the window.</p><h3>FXML: Separate Design from Logic</h3><p>You can build UIs entirely in Java, but JavaFX also supports FXML, an XML-based format for describing your interface. Your layout lives in an .fxml file, and a Java controller class handles the behavior.</p><p>This separation keeps your code clean and lets designers and developers work side by side. Scene Builder, a free drag-and-drop visual editor, lets you design FXML interfaces without writing XML by hand.</p><h3>Style It with CSS</h3><p>JavaFX supports CSS for styling, with its own -fx- prefixed properties:</p><pre>.button {<br>    -fx-background-color: #1d9bf0;<br>    -fx-text-fill: white;<br>    -fx-font-size: 14px;<br>    -fx-background-radius: 8;<br>}<br><br>.button:hover {<br>    -fx-background-color: #0c7abf;<br>}</pre><p>Load the stylesheet into your scene and your whole app updates, with no Java changes needed. Themes, dark mode and branding become straightforward</p><h3>Properties and Bindings: The Superpower</h3><p>This is one of JavaFX’s best features. Most values in JavaFX are observable properties, and you can bind them together so one updates automatically when the other changes.</p><pre>TextField input = new TextField();<br>Label preview = new Label();<br><br>preview.textProperty().bind(input.textProperty());</pre><p>Now the label mirrors whatever the user types, with no listeners or manual syncing. As your UI grows, bindings keep everything consistent and remove a whole category of bugs.</p><h3>What’s Built In</h3><p>JavaFX ships with a lot out of the box:</p><p>Controls: TableView, TreeView, ListView, ComboBox, DatePicker and more</p><p>Charts: line, bar, pie, area and scatter</p><p>Media: audio and video playback</p><p>WebView: an embedded web browser component</p><p>Animation: transitions, timelines and effects</p><p>3D: basic 3D shapes, cameras and lighting</p><h4>Shipping Your App</h4><p>Once your app is ready, you don’t need to ask users to install Java. The jpackage tool, included in the JDK, bundles your app together with a Java runtime into a native installer:</p><p>Windows: .exe or .msi</p><p>macOS: .dmg or .pkg</p><p>Linux: .deb or .rpm</p><p>Your users just download and run it like any other app</p><h4>How to Get Started</h4><p>1. Install a recent JDK. Version 17 or newer is a good baseline.</p><p>2. Add JavaFX to your project. With Maven or Gradle, add the OpenJFX dependencies. Download and setup details are at openjfx.io.</p><p>3. Install Scene Builder for visual layout design.</p><p>4. Follow the official docs and Gluon’s tutorials. They’re excellent and beginner-friendly.</p><p>Here’s the Maven dependency for the core controls module (check openjfx.io for the latest version):</p><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;org.openjfx&lt;/groupId&gt;<br>    &lt;artifactId&gt;javafx-controls&lt;/artifactId&gt;<br>    &lt;version&gt;YOUR_VERSION&lt;/version&gt;<br>&lt;/dependency&gt;</pre><h4>Final Thoughts</h4><p>JavaFX gives you a complete, modern UI toolkit in pure Java: CSS styling, FXML layouts, powerful bindings, charts, media and animation, across every major desktop OS. If you know Java and want to build real desktop applications, it’s well worth your time.</p><p>Thanks for Reading, Now go and apply what you have learnt. Take action 🫵💪</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1fd97d5a243" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Queue]]></title>
            <link>https://medium.com/@dwoogames9/queue-506e518e1304?source=rss-7113368230a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/506e518e1304</guid>
            <category><![CDATA[queue]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Collins Chinedu]]></dc:creator>
            <pubDate>Thu, 03 Sep 2026 16:41:28 GMT</pubDate>
            <atom:updated>2026-09-03T16:41:28.180Z</atom:updated>
            <content:encoded><![CDATA[<h2>What I Learned From Researching This Topic</h2><p>When I started looking into queues, I realized it’s one of those concepts that sounds simple at first and I was like ”oh, it’s just a line of people” 😂😂 but the more I researched it, the more I understood why it’s actually one of the most important data structures to learn properly. Here’s what I found out.</p><p><strong>What Is a Queue?</strong></p><p>A queue is a data structure that follows the FIFO rule which means First In, First Out. In simple terms, whatever gets added first is the first thing that gets removed. I found it easier to picture it as a literal line of people: the person who joined the line first is the one who gets served first( first come first serve) kind of thing . Nobody skips ahead.</p><p>While researching this in the context of Java, I learned that Queue isn’t a class you can create directly rather it’s an interface. That means you can’t just write new Queue(). Instead, you have to use a class that implements it, and the most common ones I came across were:</p><p>LinkedList — the one most tutorials use to introduce queues</p><p>ArrayDeque — I read that this is actually recommended over LinkedList for pure queue operations because it performs better</p><p>PriorityQueue — this one doesn’t follow FIFO at all; it reorders elements based on priority, which I found interesting once I understood why that matters</p><p>The main operations I kept seeing over and over were:</p><p>Operation :</p><p>offer() / add()</p><p>What it does :</p><p>Adds an element to the back of the queue</p><p>Operation:</p><p>poll() / remove()</p><p>What it does:</p><p>Removes and returns the element at the front</p><p>Operation:</p><p>peek()</p><p>What it does:</p><p>Lets you check what’s at the front without removing it</p><p>Here’s a small example I wrote to make sure I actually understood it, not just copied it:</p><pre>Queue&lt;String&gt; queue = new LinkedList&lt;&gt;();<br>queue.offer(&quot;Ali&quot;);<br>queue.offer(&quot;Musa&quot;);<br>queue.poll();               // removes &quot;Ali&quot;<br>System.out.println(queue.peek()); // prints &quot;Musa&quot;</pre><p>Something that helped me really lock this in was comparing it to a Stack, which I had learned earlier. A stack is LIFO — Last In, First Out — like a stack of plates where you always take from the top.</p><p>A queue is the opposite: you add from one end and remove from the other. Once I compared the two side by side, the idea of “order” finally clicked for me.</p><p><strong>Why Does This Actually Matter?</strong></p><p>This is the part I didn’t fully appreciate until I looked past the textbook definition. A queue isn’t just a coding exercise. it exists because order and fairness are a real requirement in a lot of systems, not just a “nice to have.”</p><p>Here’s what stood out to me while researching this:</p><p>Java relies on queues internally. I read that ExecutorService, which manages thread pools in Java, uses queues to hold tasks that are waiting for a thread to become available. I didn’t expect something I thought was “basic” to be used at that level.</p><p>Concurrency depends on it. Java has thread-safe versions like BlockingQueue, which are used in what’s called a producer-consumer setup — one part of a program creates tasks, another part processes them, and the queue is what keeps that handoff safe and orderly.</p><p>Algorithms need it, not just data storage. I learned that Breadth-First Search (BFS), which is used to explore graphs and trees, literally cannot work without a queue. The queue is what keeps track of which node to visit next.</p><p>Not everything is strictly FIFO. This was the part that surprised me most, a PriorityQueue breaks the “first come first served” rule on purpose, because sometimes priority matters more than arrival order. That completely changed how I think about queues because they’re not one rigid idea, they’re a concept with variations depending on what problem you’re solving.</p><p><strong>Real Examples That Made This Click for Me</strong></p><p>I didn’t fully understand queues until I stopped thinking about the definition and started thinking about the problem each example was solving. Here’s what helped:</p><p>Bank lines. The problem is obvious, if people weren’t served in the order they arrived, it would be unfair and chaotic. A queue solves that simply by enforcing arrival order. But then I thought about an emergency room, and realized that’s actually closer to a PriorityQueue because the most urgent patient gets seen first, not necessarily the one who arrived first. That distinction made me understand that queues aren’t all identical; they can be adapted depending on what “fairness” means in that context.</p><p>Print spoolers. This one made the technical use case click for me. If multiple people send documents to the same printer at once, something needs to manage the order so print jobs don’t overlap or get lost. A queue handles that by lining up each job and printing them one at a time, in the order they were sent.</p><p>Call centers. I connected this to something I’d actually experienced like being told “you’re number 4 in the queue” when calling customer support. That’s a literal, real-time queue in action, and it made the concept feel a lot less abstract.</p><p>Messaging systems. This was the example that made me realize how big this concept actually gets. In systems like WhatsApp or food delivery apps, one part of the system is producing data quickly (orders, messages) while another part processes it slightly slower. A queue holds everything in between so nothing gets lost or processed out of order — and I read that big real-world systems like Kafka or RabbitMQ are basically advanced versions of this exact same idea.</p><p>In Conclusion</p><p>Researching this topic changed how I see queues. I went in thinking of it as “just FIFO,” but I came out understanding that a queue is really a solution to a fairness and ordering problem that shows up everywhere, from something as small as a LinkedList in Java, to something as large as the systems that manage millions of messages a day. It’s a small concept on paper, but once you see where it’s actually used, it stops feeling like an abstract data structure and starts feeling like something genuinely useful.</p><p>Thanks for reading to the end, I hope you picked up something.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=506e518e1304" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[# Arrays and Queues: The Data Structures You Meet First (And Never Really Leave Behind)]]></title>
            <link>https://medium.com/@dwoogames9/arrays-and-queues-the-data-structures-you-meet-first-and-never-really-leave-behind-d9a5fdf7a6ca?source=rss-7113368230a9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9a5fdf7a6ca</guid>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Collins Chinedu]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 13:10:35 GMT</pubDate>
            <atom:updated>2026-08-29T13:10:35.960Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re learning Java, or programming in general, there’s a good chance the very first “real” data structure you were introduced to was the ARRAY . Not long after, you probably met its close cousin, the QUEUE. They seem simple on the surface, but once you understand WHY they exist and HOW they work under the hood, you start to see them everywhere — in the tools you use daily, and in the more advanced structures you’ll learn later.</p><p>Let’s break both of them down properly.</p><p>## Array</p><p>### 1. Definition</p><p>An array is a fixed-size, ordered collection of elements of the same data type, stored in contiguous memory locations. In Java, every array is an object, and each element inside it can be accessed directly using an index — starting from 0, not 1 (a detail that trips up almost every beginner at least once).</p><p>```java</p><p>int[] scores = {90, 85, 77};</p><p>System.out.println(scores[1]); // 85</p><p>```</p><p>Here’s the reasoning behind it: imagine you needed to store the scores of 30 students. You *could* create 30 separate variables — `score1`, `score2`, `score3`… — but that quickly becomes unmanageable. An array solves this by giving you one container that holds all 30 values, each one sitting in its own numbered slot.</p><p>The trade-off is that in Java, once you decide how big an array is, that size is locked in. It doesn’t grow or shrink on the fly. In exchange for that rigidity, you get something valuable: speed. Because every element sits right next to the last one in memory, Java can calculate exactly where any element is and jump straight to it no searching required.</p><p>### 2. Why It Matters in Java</p><ul><li>**Speed (O(1) access)** — Because array elements are stored contiguously, Java can retrieve any element instantly using its index, without scanning through the rest of the array.</li><li>- **Foundation for other structures** — Structures like `ArrayList`, `Stack`, and even `HashMap` (internally) are built on top of arrays. Understanding arrays makes everything after them easier to grasp.</li><li>- **Memory efficiency** — There’s no extra overhead for pointers or links between elements, unlike some other structures.</li><li>- **Everywhere in algorithms** — Sorting, searching, and matrix operations (`int[][] grid`) all lean on arrays as their backbone.</li></ul><p>### 3. Real-World Example</p><p>Think of an array like a row of numbered lockers in a school hallway. If you know a student’s locker number, you walk straight to it — you don’t check every locker along the way. That’s index-based access in action.</p><p>But the row of lockers only has so much space. If the school needs more lockers, it can’t just extend the existing row — it has to build a new one elsewhere. That’s exactly how a Java array behaves: fixed size, instant access, no flexibility.</p><p>A practical example: storing the temperature recorded every hour of the day.</p><p>```java</p><p>int[] hourlyTemps = new int[24];</p><p>hourlyTemps[8] = 22; // temperature at 8 AM</p><p>```</p><p>— -</p><p>## Queue</p><p>### 1. Definition</p><p>A queue is a linear data structure that follows **FIFO** — First In, First Out. Whatever gets added first is the first one to leave. In Java, `Queue` is an interface (`java.util.Queue`), and it’s commonly implemented by classes like `LinkedList`, `ArrayDeque`, or `PriorityQueue`.</p><p>```java</p><p>Queue&lt;String&gt; queue = new LinkedList&lt;&gt;();</p><p>queue.offer(“Ali”); // added to the back</p><p>queue.offer(“Musa”);</p><p>queue.poll(); // removes and returns “Ali” — the front of the line</p><p>```</p><p>The core operations are simple:</p><ul><li>`offer()` / `add()` — insert at the rear.</li><li>- `poll()` / `remove()` — remove from the front.</li><li>- `peek()` — look at the front element without removing it.</li></ul><p>### 2. Why It Matters in Java</p><ul><li>**Order-preserving processing** — Queues guarantee that things are handled in the exact order they arrived, which matters anywhere fairness or sequence is important.</li><li>- **Powers real system operations** — Java’s own `ExecutorService` (thread pools), task scheduling, and event handling rely on queues internally.</li><li>- **Concurrency support** — Java offers thread-safe queue implementations like `BlockingQueue` and `ConcurrentLinkedQueue`, which are essential in multi-threaded programs, especially producer-consumer scenarios.</li><li>- **A backbone for algorithms** — Breadth-First Search (BFS), used in trees and graphs, depends entirely on queues to process nodes level by level.</li><li>- **Flexible variants** — Not every queue has to be strict FIFO. A `PriorityQueue` lets more urgent items jump ahead, and a `Deque` allows insertion/removal from both ends.</li></ul><p>### 3. Real-World Example</p><p>Picture people lining up at a bank or a ticket counter. The first person in line is the first one served. New arrivals join at the back, and nobody skips ahead — unless it’s more like an emergency room, where a `PriorityQueue` model applies and more urgent cases get seen first, regardless of when they arrived.</p><p>A practical software example: a print spooler. Documents sent to a printer are placed in a queue and printed in the exact order they were submitted.</p><p>```java</p><p>Queue&lt;String&gt; printQueue = new LinkedList&lt;&gt;();</p><p>printQueue.offer(“Document1.pdf”);</p><p>printQueue.offer(“Document2.pdf”);</p><p>System.out.println(printQueue.poll()); // prints “Document1.pdf” first</p><p>```</p><p>— -</p><p>## Wrapping Up</p><p>Arrays and queues might look like “beginner” topics, but they’re really the quiet backbone of almost everything more advanced you’ll build later. Arrays teach you how memory and indexing work. Queues teach you how order and fairness get enforced in code. Together, they show up in browsers, printers, operating systems, and the very language runtime you’re coding in — which is exactly why they’re usually the first two structures every developer learns.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9a5fdf7a6ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>