Maximized Selected InternalFrame
Can't seem to get it to work. I'm sorry if this sounds like a newbie question. Here is my form class which just show and [supposed to, but not doing it] maximize Internal Frame.
Code:
import javax.swing.*;
public class form {
public static void showform(String title,
JInternalFrame child,
JDesktopPane parent){
for(int i=0;i<parent.getAllFrames().length;i++){
JInternalFrame f=parent.getAllFrames()[i];
if(f.getName().equals(title)){
try{
f.setMaximum(true);
f.setSelected(true);
}
catch(Exception ex){
JOptionPane.showMessageDialog(child,ex.getMessage());
}
return;
}
}
parent.add(child);
try{
child.setMaximum(true);
child.setSelected(true);
}
catch(Exception ex){
JOptionPane.showMessageDialog(null,ex.getMessage());
}
}
}
and some use
Code:
void mnunatureofcollectionlist_actionPerformed(ActionEvent e){
form.showform("frmnatureofcollectionlist",new frmnatureofcollectionlist(),desktop);
}
Any suggestion? Thank you very much. :)
Re: Maximized Selected InternalFrame
I thought you were suppose to throw a PropertyVetoExcetion when using maximize. If not, you can do it anyway and see if the problem is simply that the internal frame is rejecting the maximize property. I did read were some look and feels don't support the maximize property of the internal frame, but who knows.