Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/** * * @author IST240 Group 5 */ import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JPanel; public class CreditPanel extends JPanel implements ActionListener
/**
*
* @author IST240 Group 5
*/
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JPanel;
public class CreditPanel extends JPanel implements ActionListener {
JButton backToHome;
CreditTopPanel creditTopPanel;
public CreditPanel() {
super();
BorderLayout border = new BorderLayout();
setLayout(border);
creditTopPanel = new CreditTopPanel();
add(creditTopPanel, BorderLayout.CENTER);
backToHome = new JButton("Main Menu");
backToHome.addActionListener(this);
add(backToHome, BorderLayout.SOUTH);
}
@Override
public void actionPerformed(ActionEvent event) {
Object obj = event.getSource();
if (obj == backToHome) {
removeAll();
IntroPanel intro = new IntroPanel();
add(intro);
repaint();
revalidate();
}
}
}
This is what I have so far please add to it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started