Start with really simple games like hangman. Tictactoe for 2 players is easy too, quite more difficult is tictactoe if the computer playes one side!
With these games you don't need a graphical interface, you can just use standard input and output from the terminal (also known as console). Eg inspired from https://stackoverflow.com/a/5488107 :
import java.util.Scanner;
public class CopyTerminal {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String line = "";
while (!line.startsWith("quit") && s.hasNextLine()) {
line = s.nextLine();
System.out.println(line);
}
s.close();
}
}
Instead of merely printing the read line, check if the user typed something you understand by examining the 'line' variable, and process that input. update the game data, and print the new situation using System.out.println calls.
It may seem a bit silly to start here, but using the terminal is an easy and quick way to display information, I use it every day. Just printing a bunch of text lines is much simpler than displaying it in a graphical way. It allows you to quickly try things, and concentrate on the actual game rather than get distracted by big complicated gui stuff that merely just displays some information.
For swing, I would advise to first do a normal swing tutorial. You may find however it is quite oriented at normal gui (menu-bar, drop-down, buttons, labels, popup windows, hovers, etc) as you see in every-day programs, and not so much aimed at displaying loads of nice splashy graphics and cool sound-effects, as you tend to have in a game.
This is why people here use specialized game libraries like libgdx. Like swing it provides functionality for display and keyboard interaction, but also for displaying lots of graphics, and other things you may need in a game, like sound, joystick support etc.