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.