Commit bd4d8d92 authored by thomas@cs.ru.nl's avatar thomas@cs.ru.nl
Browse files

Added name of the loaded file to the title

parent 27b8b797
...@@ -47,6 +47,8 @@ import nl.uu.cs.ssm.Utils; ...@@ -47,6 +47,8 @@ import nl.uu.cs.ssm.Utils;
public class SSMRunner extends JFrame public class SSMRunner extends JFrame
implements Messenger, FocusListener, TableModelListener implements Messenger, FocusListener, TableModelListener
{ {
private String title = "Simple Stack Machine Interpreter";
private static final long serialVersionUID = 1L ; private static final long serialVersionUID = 1L ;
public final static int STEP_BY_STEP = 0 ; public final static int STEP_BY_STEP = 0 ;
...@@ -325,7 +327,7 @@ public class SSMRunner extends JFrame ...@@ -325,7 +327,7 @@ public class SSMRunner extends JFrame
setFont(new java.awt.Font("SansSerif", 0, 12)); setFont(new java.awt.Font("SansSerif", 0, 12));
setJMenuBar(JMenuBar); setJMenuBar(JMenuBar);
getContentPane().setLayout(new java.awt.BorderLayout(0, 0)); getContentPane().setLayout(new java.awt.BorderLayout(0, 0));
setTitle("Simple Stack Machine Interpreter"); setTitle(title);
JMenuBar.add(jMenuFile); JMenuBar.add(jMenuFile);
JMenuBar.add(jMenuRunner); JMenuBar.add(jMenuRunner);
...@@ -777,6 +779,7 @@ public class SSMRunner extends JFrame ...@@ -777,6 +779,7 @@ public class SSMRunner extends JFrame
} }
} }
fr.close() ; fr.close() ;
setTitle(title + " - " + f.getName());
} }
catch ( Exception ex ) catch ( Exception ex )
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment