File tree 1 file changed +4
-1
lines changed
src/main/java/edu/princeton/cs/algs4
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,10 @@ public void setOriginLowerLeft() {
229
229
/**
230
230
* Displays the picture in a window on the screen.
231
231
*/
232
+
233
+ // getMenuShortcutKeyMask() deprecated in Java 10 but its replacement
234
+ // getMenuShortcutKeyMaskEx() is not available in Java 8
235
+ @ SuppressWarnings ("deprecation" )
232
236
public void show () {
233
237
234
238
// create the GUI for viewing the image if needed
@@ -240,7 +244,6 @@ public void show() {
240
244
menuBar .add (menu );
241
245
JMenuItem menuItem1 = new JMenuItem (" Save... " );
242
246
menuItem1 .addActionListener (this );
243
- // use getMenuShortcutKeyMaskEx() in Java 10 (getMenuShortcutKeyMask() deprecated)
244
247
menuItem1 .setAccelerator (KeyStroke .getKeyStroke (KeyEvent .VK_S ,
245
248
Toolkit .getDefaultToolkit ().getMenuShortcutKeyMask ()));
246
249
menu .add (menuItem1 );
You can’t perform that action at this time.
0 commit comments