I have the following code where I made singleton/enum manager so it keeps track of the number of internal frames that have been opened and I can get information from anyone of the frames when the user clicks on it (which activates the frame). But I don't know how to make this work because I want when a user clicks suppose on the 1st frame (out of 5 frames that have been opened), I want a save button to be enabled. When none of the windows are activated I want the button to be disabled. I put an internal frame listener and a component listener but none of them work. I was hoping if anyone could tell me where I am going wrong. 

Here is the code:

 public class Manager implements ActionListener, InternalFrameListener, ComponentListener{

private static int openFrameCount =0;
ImagePlus image;
private String tile;
final String SHOW ="show";
static ImageWindow m;
JMenuItem showInfo;
static JMenuItem save;
static JDesktopPane desktop;
InfoGui in;

public Manager(ImagePlus img, String title, JDesktopPane desktop, JMenuItem save){
    image = img;
    this.desktop = desktop;
    this.tile = title;
    this.save = save;
}

public enum WindowManager {

    INSTANCE;
    public MyInternalFrame frame;
    private Map&lt;ImagePlus, List&lt;MyInternalFrame&gt;&gt; mapWindows;

    private WindowManager(){

        mapWindows = new HashMap&lt;&gt;(25);

    }

    public class MyInternalFrame extends JInternalFrame {

        static final int xPosition = 30, yPosition = 30;
        public MyInternalFrame(String title, ImagePlus img, JMenuItem save) {
            super(title, true,true, true, true);
            setSize(img.getWidth(),img.getHeight());

            // Set the window's location.
            setLocation(xPosition * openFrameCount, yPosition * openFrameCount);
            save.setEnabled(true);
        }
    }

    public JInternalFrame createWindowFor(ImagePlus image) {

        List&lt;MyInternalFrame&gt; frames = mapWindows.get(image);

        if (frames == null) {
            frames = new ArrayList&lt;&gt;(25);
            mapWindows.put(image, frames);
        }

        JPanel panel = new JPanel();

        ImageCanvas c = new ImageCanvas(image);
        c.getImage();

        //panel2.add(new JLabel(new ImageIcon(c.getImage())));
         m = new ImageWindow(image);

        Image n = new Image();
        //frame = new MyInternalFrame(title, img, save,m);
        //ImageCanvas c = m.getCanvas();
        ImagePlus im = new ImagePlus();
        im.setImage(image);

        frame = new MyInternalFrame(image.getTitle(), image, save);
        m.centerNextImage();
        image.getCanvas().setScaleToFit(true);

        panel.add(m.getCanvas());
        panel.setBackground(Color.white);
        frame.add(panel);
        frames.add(frame);

        frame.setVisible(true); 
        frame.setAutoscrolls(true);
        frame.setAutoscrolls(true);
        frame.setOpaque(true);
        desktop.add(frame);
        try {
                frame.setSelected(true);
        } catch (java.beans.PropertyVetoException e) {

        }

        return frame;

    }

    public List&lt;MyInternalFrame&gt; getFromFor(ImagePlus image) {

        JInternalFrame frame = null;
        return mapWindows.get(image.getTitle());

    }

}



@Override
public void actionPerformed(ActionEvent e) {
    // TODO Auto-generated method stub
    SADAPP.Manager.WindowManager.MyInternalFrame m = (SADAPP.Manager.WindowManager.MyInternalFrame) WindowManager.INSTANCE.createWindowFor(image);
}



@Override
public void internalFrameActivated(InternalFrameEvent arg0) {
    // TODO Auto-generated method stub
    save.setEnabled(true);
}



@Override
public void internalFrameClosed(InternalFrameEvent arg0) {
    // TODO Auto-generated method stub
    save.setEnabled(false);
}



@Override
public void internalFrameClosing(InternalFrameEvent arg0) {
    // TODO Auto-generated method stub
    save.setEnabled(false);
}



@Override
public void internalFrameDeactivated(InternalFrameEvent arg0) {
    // TODO Auto-generated method stub
    save.setEnabled(false);
}



@Override
public void internalFrameDeiconified(InternalFrameEvent arg0) {
    // TODO Auto-generated method stub
    save.setEnabled(true);
}



@Override
public void internalFrameIconified(InternalFrameEvent arg0) {
    // TODO Auto-generated method stub
    save.setEnabled(false);
}



@Override
public void internalFrameOpened(InternalFrameEvent arg0) {
    // TODO Auto-generated method stub
    save.setEnabled(true);
}



@Override
public void componentHidden(ComponentEvent arg0) {
    // TODO Auto-generated method stub
    save.setEnabled(false);
}



@Override
public void componentMoved(ComponentEvent arg0) {
    // TODO Auto-generated method stub

}



@Override
public void componentResized(ComponentEvent arg0) {
    // TODO Auto-generated method stub
    Rectangle r = WindowManager.INSTANCE.frame.getBounds();

    m.getCanvas().fitToWindow(r);
    System.out.println("resized- the real one");
}



@Override
public void componentShown(ComponentEvent arg0) {
    // TODO Auto-generated method stub

}

 }



Question: How can I add a director name in line with author name in beamer?
Answer: You can adopt an approach based on columns environment:

\documentclass{beamer}
\usepackage[T1]{fontenc}

\usetheme{CambridgeUS}
\title{My title}
\institute{My institute}
\author[Author name]{Made by:\\Author name} %&lt;= used the short author name [] for the footline
\newcommand{\director}{Directed by:\\Director name}

% re-definition of the title page
\setbeamertemplate{title page}{
\centering
\begin{beamercolorbox}[rounded=true,shadow=true,sep=8pt,center]{title}
\inserttitle \par
\end{beamercolorbox}
\vfill
\begin{beamercolorbox}[leftskip=8cm,center,wd=0.7\textwidth]{author}
\begin{columns}[T]
\begin{column}{.49\textwidth}%
\centering
\insertauthor
\end{column}
\begin{column}{.49\textwidth}%
\centering
\director
\end{column}
\end{columns}
\end{beamercolorbox}
\vfill
\usebeamerfont{institute}\insertinstitute \par
\vfill
\centering
\insertdate\par
\vfill
}

\begin{document}
\begin{frame}
\titlepage
\end{frame}

\begin{frame}{Title}
example text
\end{frame}
\end{document}


which gives you:





Notice that I adopted the short name for the author to not display in the footline the string Made by:.