Now we’re going to set up a GUI project for real.
Go to your Github repo and click the green Code button
From there click the “Codespaces” tab.
If you see something like this, click the big green button. Otherwise see the next slide.
If you’ve already created codespaces you won’t see the “Create codespace on main” button. In that case click the + icon.
It will take a while to start up. Like several minutes.
Once everything opens up, in the file explorer find the file start-project
and right click on it and choose “Open in Integrated Terminal”.
start-project
In the terminal type:
./start-project grid-game
and hit return.
This will create a folder named grid-game
under the projects
folder and also populate it with the starter code.
Browse under projects/grid-game
in the file explorer and then click on GUI.java
to open that file in an editor.
Click the play button at the top of the page.
Find the line that starts with 6080 and over over the “Forwarded Address” column. Some icons should appear. Click the globe.
In the new browser tab click the Connect button.
Assuming you don’t get any error, switch back to the other tab and you should see a simple GUI.