Question: Modify the file //StudentData.java import java.awt.BorderLayout; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; public class StudentData extends JFrame{ TopPanel top = new TopPanel(); MiddlePanel mid =
Modify the file
//StudentData.java
import java.awt.BorderLayout;
import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder;
public class StudentData extends JFrame{ TopPanel top = new TopPanel(); MiddlePanel mid = new MiddlePanel(); BottomPanel bottom = new BottomPanel(); public StudentData(){ JPanel p1=new JPanel(); p1.setBorder(new EmptyBorder(10,10,10,10)); JPanel p2 = new JPanel(); p2.setLayout(new BorderLayout()); p2.add(top, BorderLayout.NORTH); p2.add(mid, BorderLayout.CENTER); p2.add(bottom, BorderLayout.SOUTH); p1.add(p2); add(p1); } // end StudentData constructor public static void main(String[] args) { StudentData frame = new StudentData(); frame.pack(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocationRelativeTo(null); frame.setVisible(true); }// end main
}// end StudentData class
.Add a TabbedPane to the GUI.The TabbedPane should have 2 tabs.The first Tab should be say Student GUI.The second Tab should ready Hello World and can have anything.Maybe just add one JLabel that says Hello World.
Rebuild the StudentGUI class without using Layout Managers.Maybe call ne class .You will not need to build 3 separate classes for this one.Just one class called StudentGUINoLayouts.Add all components in the appropriate locations.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
