Search code examples
javaswingjinternalframe

How to set JInternalFrame title?


I'm trying to set the title bar of JInternalFrame with setTitle() but it does not change.I don't know what am I doing wrong? I works fine if I initialize it in the constructor,but after it is set,it does not change.

Here is my code :

JInternalFrame internalFrame = new JInternalFrame("test",false, false, false, false);
internalFrame.setTitle("test2");

this is the result I'm getting.

enter image description here


Solution

  • JDK-4131008 : JInternalFrame doesn't refresh after changing the title, you must call repaint()