Skip to content

Commit f2decf9

Browse files
authored
Merge pull request #25 from PunGrumpy/prettier-java
Prettier Java
2 parents 1080e19 + aeaaee4 commit f2decf9

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

src/main/GamePanel.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import java.awt.event.ActionListener;
1313
import java.awt.event.MouseAdapter;
1414
import java.awt.event.MouseEvent;
15-
1615
import javax.swing.BorderFactory;
1716
import javax.swing.BoxLayout;
1817
import javax.swing.ImageIcon;
@@ -157,11 +156,7 @@ private void Render() {
157156

158157
ImageIcon hintsIcon = new ImageIcon("asset/hints.png");
159158
Image image = hintsIcon.getImage();
160-
Image scaledImage = image.getScaledInstance(
161-
25,
162-
25,
163-
Image.SCALE_SMOOTH
164-
);
159+
Image scaledImage = image.getScaledInstance(25, 25, Image.SCALE_SMOOTH);
165160
ImageIcon scaledImageIcon = new ImageIcon(scaledImage);
166161
JLabel hints_button = new JLabel(scaledImageIcon);
167162
hints_button.setBorder(new EmptyBorder(20, 0, 0, 10));
@@ -205,20 +200,24 @@ public void actionPerformed(ActionEvent e) {
205200
}
206201
);
207202
}
208-
209-
private void LinkHints(JLabel hintsFrame){
210-
hintsFrame.addMouseListener(new MouseAdapter() {
211-
@Override
212-
public void mouseClicked(MouseEvent e) {
213-
String hintString = String.valueOf(Integer.toBinaryString(UNKNOW_NUMBER));
214-
JOptionPane.showConfirmDialog(
215-
null,
216-
hintString,
217-
"Hints",
218-
JOptionPane.CLOSED_OPTION
219-
);
203+
204+
private void LinkHints(JLabel hintsFrame) {
205+
hintsFrame.addMouseListener(
206+
new MouseAdapter() {
207+
@Override
208+
public void mouseClicked(MouseEvent e) {
209+
String hintString = String.valueOf(
210+
Integer.toBinaryString(UNKNOW_NUMBER)
211+
);
212+
JOptionPane.showConfirmDialog(
213+
null,
214+
hintString,
215+
"Hints",
216+
JOptionPane.CLOSED_OPTION
217+
);
218+
}
220219
}
221-
});
220+
);
222221
}
223222

224223
public void linkMenu(JLabel back_button) {

0 commit comments

Comments
 (0)