You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: projects/set-up-a-gui-with-java/set-up-a-gui-with-java.mdx
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ tags:
18
18
cl="for-sidebar"
19
19
/>
20
20
21
-
# Set up a GUI (Graphical User Interface) with Java
21
+
# Set Up a GUI with Java
22
22
23
23
<AuthorAvatar
24
24
author_name="Ellie Popoca"
@@ -40,15 +40,15 @@ tags:
40
40
41
41
GUI (Often pronounced "GOO-ee", but actually "Gee-Yuuu-Eye") stands for **graphical user interface**.
42
42
43
-
Back in the OLD, ANCIENT days of the 1980s, you had to be a knowledgeable tech person to really use computers, but thanks to graphical user interfaces, things like buttons, sliders, windows, and menus let your 5-year-old sibling pull up Roblox on their iPad!
43
+
Back in the OLD, ANCIENT days of the 1980s, you had to be a knowledgeable tech person to really use computers, but thanks to graphical user interfaces, things like buttons, sliders, windows, and menus let your 5-year-old sibling pull up [Roblox](https://en.wikipedia.org/wiki/Roblox) on their iPad!
You use GUIs every day, and most commonly, web-based GUIs! As you can imagine, ChatGPT is a GUI, as it lets you prompt without ever interacting with code or the command line.
In Java development, you're able to create GUIs for your programs without needing any additional downloads! All you need is the **Swing** GUI Toolkit import statement in the IDE of your choice, and you're able to get started immediately!
54
54
@@ -61,23 +61,23 @@ If you don't already have a Java IDE, Click [here]() to set yours up!
61
61
62
62
Create a public class and add a main method to begin.
63
63
64
-
You'll want to add a `JFrame` object with a title, and use methods like `.setSize`, `.setDefaultCloseOperation`, and `.setLayout` to set up your window screen.
64
+
You'll want to add a `JFrame` object with a title, and use methods like `.setSize()`, `.setDefaultCloseOperation`, and `.setLayout` to set up your window screen.
65
65
66
-
Then, close your program with `frame.setVisible(true);` to see your interface!
66
+
Then, close your program with `frame.setVisible(true)` to see your interface!
@@ -142,11 +142,11 @@ Now, we can see a name in our frame!
142
142
143
143
Congrats! You've made your very own GUI with Java's Swing GUI Toolkit. This is just the beginning of the possibilities of what you can build with Java; Games, forms, and image displays are now possible with Swing!
144
144
145
+
### More Resources
145
146
Be sure to check out
146
147
-[The Swing API Documentation](https://docs.oracle.com/javase/7/docs/api/javax/swing/package-summary.html) to see other methods and objects you can create for your GUI
147
148
-[Setting up your local Java Development Environment]()
148
149
149
-
150
150
Note that Swing is the default, built-in GUI Toolkit. Other toolkits like [JavaFX](https://openjfx.io/openjfx-docs/#install-javafx) exist with more functionality with their own SDK, or download package.
0 commit comments