Hello, i am trying to update the title of a JInternalFrame component in my Java Project.
The component is an instance of my ImageFrame class which extends JInternalFrame, and in my code I call a setter method in my ImageFrame class which updates the title attribute. I ran a Unit test and know that the attribute is updating properly, but I can't figure out how to refresh the component to show the new title.
Any Ideas?
FYI: I was unable to get .repaint() to do the trick.
Here's the Code:
File selectedFile = fileChooser.getSelectedFile(); // Gets File selected in JFileChooser
try {
ImageReadWrite.write(img, selectedFile); // Writes Image Data to a File
frame.setFilePath(selectedFile.getAbsolutePath()); // Changes File Location Attribute in Instance Of ImageFrame
frame.setFileName(selectedFile.getName()); // Changes Window Title Attribute
//frame.??
}
catch (Exception event) {
event.printStackTrace();
}
so what I need here is to know what I should add to make the component update with the new title