OOP with Java: 17. Tetris Game with Java Swing (Part VII. Adding a leaderboard)

preview_player
Показать описание
In this video, we will make our game a bit more competitive by adding a leaderboard. To display the leaderboard, we will use the JTable component; and to let the user type in their name, we will use of the static methods of the JOptionPane class. We will add a couple more Frame forms to our project and wire them all up into a single multi-form program. In addition, we will further modify our program to make the game restart correctly by terminating the game thread and resetting necessary field.

Рекомендации по теме
Комментарии
Автор

YouTube thank you for recommending this channel to me. This guy is amazing.

bakermrad
Автор

I really enjoy watching your works. good job sir

nicolasmarkjosephl.
Автор

I am having an issue where my program crashes after I implement all the features up until 5:40. It is telling me that the method "private void drawBlock(Grpahics g)" is throwing a NullPointerException at the line where we instantiate the variable "int h = block.getHeight();". I am not sure exactly why this is happening, since the program seemed to work fine before completing the steps in this video.
Here is what the actual error reads:
"Exception in thread "AWT-EventQueue-0"
at
at

smaller issue that I was having that may be related to the problem at hand: I was unable to put JLabels on the right side of the gameAreaPlaceHolder because after running they would display for a half-second in the middle of the gameAreaPlaceHolder and then be completely hidden behind it. So I just moved them to the LEFT side, which seemed to work completely fine. Obviously until now, where I tried performing the steps up until @5:40.

Would anyone have any ideas why this might be happening?

litlitty
Автор

can i see the source code of GameForm?

jethro
Автор

Guys, just watch these amazing videos!))

OleksandrProkopenko_ua
Автор

i am getting lots of errors even though form is logging
some block of every shapes overlaps with another
it would be great if i can get some help from you

nabintiwari
welcome to shbcf.ru