I am designing a GUI, where I have added logo's to several frames. I want to make the logo's functional so that when they're clicked upon, it returns then to the main menu frame.
For example; I have the following logo created here (In controller class):
LogoTitlePanel = new JPanel(new GridLayout(1, 1));
LogoTitlePanel.setBackground(new java.awt.Color(255, 255, 255));
frame.add(LogoTitlePanel, BorderLayout.PAGE_START);
frame.setVisible(true);
LogoImage = new ImageIcon(getClass().getResource("Acme.png"));
ImageContainer = new JLabel(LogoImage);
LogoTitlePanel.add(ImageContainer);
wholeFramePanel.add(LogoTitlePanel);
frame.add(wholeFramePanel, BorderLayout.CENTER);
frame.setVisible(true);
... and I want the Acme.png image to take them to this frame upon being clicked (In MainMenu class):
frame = new JFrame("Aston Cruise & Maritime Enterprise");
Is it possible to accomplish this? if so, how?