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.
In the file explorer find the file start-project
and
right click on it and choose “Open in Integrated Terminal”. (This
script mostly replaces the old make-project
script
though it’s still there too.)
start-project
In the terminal type:
./start-project grid-game
This will create a folder named grid-game
under the
projects
folder and also populate it with the starter
code.
Browse under 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.
It will ask for a password. Enter vscode
Assuming you don’t get any error, switch back to the other tab and you should see a simple GUI.