JFrame setTitle not working
<p>Not sure why this is occurring, but when I try to change the title on my JFrame it's not updating. The JFrame is static, and I call it by saying:</p>

<pre><code>Assets.frame.setTitle("test");
</code></pre>

<p>I have one block of code in which I pass in a file's name, and it seems to work, as when I print out <code>Assets.frame.getTitle()</code>, it prints out what I want the title to be. But on the actual JFrame it doesn't change the title. I call the method in other parts of my program too, and it seems to work there. Is there some special character that could cause the method to not update the actual frame that I don't know about?</p>

<p><strong>Edit:</strong></p>

<p>What I'm trying to do (open a file)</p>

<pre><code>public static void open() {
    JFileChooser chooser = new JFileChooser();
    chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    int result = chooser.showOpenDialog(Assets.frame);
    if (result == JFileChooser.APPROVE_OPTION) {
        MyFile myFile = new MyFile(chooser.getSelectedFile().getPath());
        Main.setTitle(Constants.current_file.getName().substring(0, mapFile.getName().indexOf('.')));
    }
}
</code></pre>

<p>and the Main.setTitle() method is:</p>

<pre><code>public static void setTitle(String title) {
    Assets.frame.setTitle(title + " - " + "My Program");
}
</code></pre>

<p>The frame is defined and instantiated near program execution, and the open method is called when a JButton is pressed. This is the only JFrame I have in the project, and it is in use until the program is exited.</p>

<p>I don't know how reproducible it is, as it works when I run another similar method that has a call to Main.setTitle() too. It's just this one instance where it doesn't work.</p>