Skip to content

Commit

Permalink
fixed java8 incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ESIC-DA committed Jul 12, 2019
1 parent bac7be6 commit b060599
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/esic/AHAGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ public class AHAGUI extends JFrame
private java.util.Vector<JMenuItem> defaultTrue=new java.util.Vector<>(), defaultFalse=new java.util.Vector<>();

protected static java.awt.Dimension s_preferredTotalSize=new java.awt.Dimension(1400, 800); //store the preferred size so if they open a new file we keep that size


@SuppressWarnings("deprecation") //we have to use the old'n'busted version here for java8 compatibility
private static int getMenuShortcutKeyMask() { return java.awt.Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); }

public AHAGUI(AHAModel model, AHAController controller, boolean useMultiLineGraph)
{
m_controller=controller;
m_multilineGraph=useMultiLineGraph;
long time=System.currentTimeMillis();
m_menuShortcutKey=java.awt.Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx();
m_menuShortcutKey=getMenuShortcutKeyMask();
setBackground(java.awt.Color.BLACK); //do this first to reduce a bit of flicker on load/reload of the frame
System.err.println("Starting GUI Construction.");
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Expand Down

0 comments on commit b060599

Please sign in to comment.