@@ -72,7 +72,11 @@ private void Render() {
7272 add (subtitle );
7373
7474 JLabel unknown_number = new JLabel ("?" );
75- unknown_number .setIcon (new ImageIcon (getClass ().getClassLoader ().getResource ("asset/question.png" )));
75+ unknown_number .setIcon (
76+ new ImageIcon (
77+ getClass ().getClassLoader ().getResource ("asset/question.png" )
78+ )
79+ );
7680 unknown_number .setHorizontalTextPosition (JLabel .CENTER );
7781 unknown_number .setForeground (ColorScheme .white );
7882 unknown_number .setFont (new Font (Font .DIALOG , Font .BOLD , 120 ));
@@ -103,7 +107,9 @@ private void Render() {
103107
104108 JLabel submit_button = new JLabel ("Submit" );
105109 submit_button .setBorder (BorderFactory .createEmptyBorder (0 , 15 , 10 , 0 ));
106- submit_button .setIcon (new ImageIcon (getClass ().getClassLoader ().getResource ("asset/submit.png" )));
110+ submit_button .setIcon (
111+ new ImageIcon (getClass ().getClassLoader ().getResource ("asset/submit.png" ))
112+ );
107113 submit_button .setHorizontalTextPosition (JLabel .CENTER );
108114 submit_button .setForeground (ColorScheme .white );
109115 submit_button .setFont (new Font (Font .DIALOG , Font .BOLD , 20 ));
@@ -114,7 +120,9 @@ private void Render() {
114120 add (gridPanel );
115121
116122 JLabel continue_button = new JLabel ("Continue" );
117- continue_button .setIcon (new ImageIcon (getClass ().getClassLoader ().getResource ("asset/button.png" )));
123+ continue_button .setIcon (
124+ new ImageIcon (getClass ().getClassLoader ().getResource ("asset/button.png" ))
125+ );
118126 continue_button .setHorizontalTextPosition (JLabel .CENTER );
119127 continue_button .setForeground (ColorScheme .white );
120128 continue_button .setFont (new Font (Font .DIALOG , Font .BOLD , 20 ));
@@ -125,7 +133,9 @@ private void Render() {
125133 add (continue_button );
126134
127135 JLabel back_button = new JLabel ("Back" );
128- back_button .setIcon (new ImageIcon (getClass ().getClassLoader ().getResource ("asset/button.png" )));
136+ back_button .setIcon (
137+ new ImageIcon (getClass ().getClassLoader ().getResource ("asset/button.png" ))
138+ );
129139 back_button .setHorizontalTextPosition (JLabel .CENTER );
130140 back_button .setForeground (ColorScheme .white );
131141 back_button .setFont (new Font (Font .DIALOG , Font .BOLD , 20 ));
@@ -242,9 +252,14 @@ private void changeStatusValue(
242252
243253 if (guess_field .getText ().equals ("I love suntana" )) {
244254 status_value .setText ("Please give me more grade" );
245- music .soundEffect (getClass ().getClassLoader ().getResource ("asset/correct.wav" ));
255+ music .soundEffect (
256+ getClass ().getClassLoader ().getResource ("asset/correct.wav" )
257+ );
246258 unknown_number .setText (String .valueOf ("" ));
247- Image originalImg = new ImageIcon (getClass ().getClassLoader ().getResource ("asset/suntana.png" )).getImage ();
259+ Image originalImg = new ImageIcon (
260+ getClass ().getClassLoader ().getResource ("asset/suntana.png" )
261+ )
262+ .getImage ();
248263 Image resizedImg = originalImg .getScaledInstance (
249264 200 ,
250265 225 ,
@@ -293,7 +308,9 @@ private void changeStatusValue(
293308
294309 if (Integer .parseInt (guess_field .getText ()) == UNKNOW_NUMBER ) {
295310 status_value .setText ("Correct! You win!" );
296- music .soundEffect (getClass ().getClassLoader ().getResource ("asset/correct.wav" ));
311+ music .soundEffect (
312+ getClass ().getClassLoader ().getResource ("asset/correct.wav" )
313+ );
297314 unknown_number .setText (String .valueOf ("🏆" ));
298315 unknown_number .setForeground (ColorScheme .gold );
299316 gridPanel .setVisible (false );
@@ -313,11 +330,15 @@ private void changeStatusValue(
313330 } else if (Integer .parseInt (guess_field .getText ()) > UNKNOW_NUMBER ) {
314331 status_value .setText ("Too high!" );
315332 guess_field .setText ("" );
316- music .soundEffect (getClass ().getClassLoader ().getResource ("asset/incorrect.wav" ));
333+ music .soundEffect (
334+ getClass ().getClassLoader ().getResource ("asset/incorrect.wav" )
335+ );
317336 } else if (Integer .parseInt (guess_field .getText ()) < UNKNOW_NUMBER ) {
318337 status_value .setText ("Too low!" );
319338 guess_field .setText ("" );
320- music .soundEffect (getClass ().getClassLoader ().getResource ("asset/incorrect.wav" ));
339+ music .soundEffect (
340+ getClass ().getClassLoader ().getResource ("asset/incorrect.wav" )
341+ );
321342 }
322343 }
323344}
0 commit comments