import [Link].
*;
import [Link];
import [Link];
import [Link];
import [Link].*;
import [Link];
import [Link];
public class GUI {
static JTextField nameField;
static JTextField lrnField;
static JComboBox<String> courseComboBox;
static JRadioButton male;
static JRadioButton female;
static JSpinner yearLevel;
static DefaultTableModel deftable;
static ButtonGroup genderGroup;
static JTextField statusField;
static JTable table;
public static void main(String[] args) {
JFrame frame = new JFrame("Student Management System");
[Link](900, 600);
[Link](JFrame.EXIT_ON_CLOSE);
[Link](true);
[Link](new BorderLayout(10, 10));
// Top Panel
JPanel topPanel = new JPanel(new BorderLayout());
[Link](new Dimension([Link](), 70));
[Link]([Link]([Link]));
//top panel setUp
JLabel titleLabel = new JLabel("STUDENT MANAGEMENT SYSTEM", [Link]);
[Link](new Font("Arial", [Link], 25));
ImageIcon icon = new ImageIcon("C:/Users/Peter paul
estose/Documents/NetBeansProjects/Copy/src/[Link]");
Image image = [Link]();
Image resizedImage = [Link](50, 50,[Link].SCALE_SMOOTH);
ImageIcon resizedIcon = new ImageIcon(resizedImage);
JLabel iconLabel = new JLabel(resizedIcon);
JLabel Label = new JLabel("DorSU",[Link]);
[Link](new Font("Arial",[Link],15));
JPanel innerpanel = new JPanel();
[Link](new FlowLayout([Link]));
[Link](50,50);
[Link](iconLabel);
[Link](Label);
[Link](innerpanel,[Link]);
[Link](titleLabel, [Link]);
[Link](topPanel, [Link]);
// Admin Panel
JPanel westPanel = new JPanel(new GridLayout(5, 1, 0,0 ));
[Link]([Link](10, 10, 10, 10));
[Link]([Link]([Link]));
[Link](new Dimension(150, 460));
// SULOD SA ADMIN PANEL
JLabel adminLabel = new JLabel("ADMIN", [Link]);
[Link](new Font("Arial", [Link], 15));
[Link](adminLabel);
// Image 1
ImageIcon iconImage1 = new ImageIcon(new ImageIcon("C:/Users/Peter paul
estose/Documents/NetBeansProjects/Copy/src/[Link]")
.getImage().getScaledInstance(40, 40, Image.SCALE_SMOOTH));
JLabel label = new JLabel(iconImage1, [Link]);
// Image 2
ImageIcon iconImage2 = new ImageIcon(new ImageIcon("C:/Users/Peter paul
estose/Documents/NetBeansProjects/Copy/src/[Link]")
.getImage().getScaledInstance(40, 40, Image.SCALE_SMOOTH));
JLabel label2 = new JLabel(iconImage2, [Link]);
// Image 3
ImageIcon iconImage3 = new ImageIcon(new ImageIcon("C:/Users/Peter paul
estose/Documents/NetBeansProjects/Copy/src/[Link]")
.getImage().getScaledInstance(40, 40, Image.SCALE_SMOOTH));
JLabel label3 = new JLabel(iconImage3, [Link]);
// Image 4
ImageIcon iconImage4 = new ImageIcon(new ImageIcon("C:/Users/Peter paul
estose/Documents/NetBeansProjects/Copy/src/[Link]")
.getImage().getScaledInstance(40, 40, Image.SCALE_SMOOTH));
JLabel label4 = new JLabel(iconImage4, [Link]);
// Add labels to the panel
[Link](label);
[Link](label2);
[Link](label3);
[Link](label4);
[Link](westPanel, [Link]);
// Center Panel
JPanel centerpanel = new JPanel(null);
[Link](new Dimension(500, 350));
[Link]([Link]([Link]));
[Link](centerpanel, [Link]);
JLabel manageStudentLabel = new JLabel("MANAGE STUDENT");
[Link](80, 20, 150, 20);
[Link](manageStudentLabel);
// Name Label and Text Field
JLabel nameLabel = new JLabel("Name");
[Link](10, 60, 100, 20);
[Link](nameLabel);
nameField = new JTextField();
[Link](100, 60, 150, 20);
[Link](nameField);
// LRN Label and Text Field
JLabel lrnLabel = new JLabel("LRN");
[Link](10, 110, 100, 20);
[Link](lrnLabel);
lrnField = new JTextField();
[Link](100, 110, 150, 20);
[Link](lrnField);
// Course ComboBox
JLabel courseLabel = new JLabel("Course");
[Link](10, 160, 100, 20);
[Link](courseLabel);
String[] courses = {"BSN", "BSCE", "BITM", "BSAM"};
courseComboBox = new JComboBox<>(courses);
[Link](100, 160, 150, 20);
[Link](courseComboBox);
// Gender Radio Buttons
JLabel genderLabel = new JLabel("Gender");
[Link](10, 210, 100, 20);
[Link](genderLabel);
male = new JRadioButton("M");
[Link](100, 210, 40, 20);
female = new JRadioButton("F");
[Link](150, 210, 40, 20);
genderGroup = new ButtonGroup();
[Link](male);
[Link](female);
[Link](male);
[Link](female);
// Year Spinner
JLabel yearLevelLabel = new JLabel("Year Level");
[Link](10, 260, 250, 10);
[Link](yearLevelLabel);
String[] yearLevels = {"1st Year", "2nd Year", "3rd Year", "4th Year"};
SpinnerListModel model = new SpinnerListModel(yearLevels);
yearLevel = new JSpinner(model);
[Link](100, 260, 150, 25);
[Link](yearLevel);
JLabel LABEL = new JLabel("Status");
[Link](10, 320, 100, 20);
[Link](LABEL);
statusField = new JTextField();
[Link](100, 320,150 , 20);
[Link](statusField);
// Table Panel
JPanel tablePanel = new JPanel(null);
[Link](new Dimension(400, 300));
[Link]([Link]([Link]));
// Search Text Field and Button
JLabel searchLabel = new JLabel("Search:");
[Link](10, 20, 50, 20);
[Link](searchLabel);
JTextField searchField = new JTextField();
[Link](70, 20, 175, 20);
[Link](searchField);
JButton searchButton = new JButton("Search");
[Link](250, 20, 75, 20);
[Link](searchButton);
// ADD Button
JButton addButton = new JButton("ADD");
[Link](10, 50, 80, 25);
[Link](new addactionListener() );
[Link](addButton);
// Table for displaying student data
String[] columnNames = {"Name", "LRN", "Course", "Year", "Gender", "Status"};
deftable = new DefaultTableModel(columnNames,0);
table = new JTable(deftable);
JScrollPane tableScrollPane = new JScrollPane(table);
[Link](10, 85, 330, 260);
[Link](tableScrollPane);
// Page navigation
JLabel pageLabel = new JLabel("Page 1 of 10");
[Link](130, 360, 100, 20);
[Link](pageLabel);
JButton prevButton = new JButton("Prev");
[Link](10, 360, 80, 30);
[Link](prevButton);
JButton nextButton = new JButton("Next");
[Link](new nextButtonListener());
[Link](240, 360, 80, 30);
[Link](nextButton);
[Link](tablePanel, [Link]);
JPanel bottomPanel = new JPanel(new GridLayout(1, 3));
[Link](new Dimension([Link](), 70));
[Link]([Link]([Link]));
// ABOUT US Panel
JPanel aboutUsPanel = new JPanel();
[Link]([Link]([Link]));
[Link](new Dimension([Link](), 300));
[Link](new BoxLayout(aboutUsPanel, BoxLayout.Y_AXIS));
JLabel aboutUsLabel = new JLabel("ABOUT US");
[Link](Component.CENTER_ALIGNMENT);
[Link]([Link](5, 0, 5, 0));
[Link](aboutUsLabel);
JLabel aboutUsDetails = new JLabel("We provide quality education services.");
[Link](new Font("Arial" ,[Link],10));
[Link](Component.CENTER_ALIGNMENT);
[Link](aboutUsDetails);
// OUR SERVICES Panel
JPanel ourServicesPanel = new JPanel();
[Link](new FlowLayout([Link])); // Center text in the panel
[Link]([Link]([Link]));
[Link](new Dimension([Link](),300));
JLabel ourServicesLabel = new JLabel("OUR SERVICES");
[Link]([Link](5,0,5,0));
[Link](ourServicesLabel);
JLabel ourServicesDetails = new JLabel("Our services include student data management");
[Link](new Font("Arial",[Link],10));
[Link](Component.CENTER_ALIGNMENT);
[Link](ourServicesDetails);
// CONTACT US Panel
JPanel contactUsPanel = new JPanel();
[Link](new BoxLayout(contactUsPanel, BoxLayout.Y_AXIS)); // Use vertical layout
[Link]([Link]([Link]));
[Link](Component.CENTER_ALIGNMENT);
JLabel contactUsLabel = new JLabel("CONTACT US");
[Link](Component.CENTER_ALIGNMENT);
[Link](contactUsLabel);
JPanel facebookPanel = new JPanel(new FlowLayout([Link]));
ImageIcon icon1 = new ImageIcon("C:/Users/Peter paul
estose/Documents/NetBeansProjects/Copy/src/[Link]");
Image image1 = [Link]();
Image resizedImage1 = [Link](10, 10, [Link].SCALE_SMOOTH);
ImageIcon resizedIcon1 = new ImageIcon(resizedImage1);
JLabel iconLabel1 = new JLabel(resizedIcon1);
JLabel facebookLabel = new JLabel("[Link]");
[Link](iconLabel1);
[Link](facebookLabel);
JPanel instagramPanel = new JPanel(new FlowLayout([Link]));
ImageIcon icon2 = new ImageIcon("C:/Users/Peter paul
estose/Documents/NetBeansProjects/Copy/src/[Link]");
Image image2 = [Link]();
Image resizedImage2 = [Link](10, 10, [Link].SCALE_SMOOTH);
ImageIcon resizedIcon2 = new ImageIcon(resizedImage2);
JLabel iconLabel2 = new JLabel(resizedIcon2);
JLabel instagramLabel = new JLabel("INSTAGRAM");
[Link](iconLabel2);
[Link](instagramLabel);
[Link](facebookPanel);
[Link](instagramPanel);
// Add the three panels to the bottom panel
[Link](aboutUsPanel);
[Link](ourServicesPanel);
[Link](contactUsPanel);
[Link](bottomPanel, [Link]);
[Link](true);
}
public static class addactionListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
String Name = [Link]();
String LRN = [Link]();
String course = (String) [Link]();
String Gender = [Link]() ? "Male" :
([Link]() ? "Female" : "");
String Year = (String) [Link]();
String Status = [Link]();
if(![Link]()&& ![Link]()&&
![Link]()&& ![Link]()&&
![Link]()&&![Link]()){
[Link](new Object[]{Name, LRN, course, Year, Gender,Status});
// Show confirmation dialog using showMessageDialog
[Link](null,
"Student information added successfully.",
null,
JOptionPane.PLAIN_MESSAGE);
// Clear input fields after adding the row
[Link]("");
[Link]("");
[Link]();
[Link](0);
[Link]("1st Year");
[Link]("");
}else{
[Link](null,
"Fill all Details Before Adding "
,null,JOptionPane.INFORMATION_MESSAGE);
public static class nextButtonListener implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
// Clear the table (show empty)
DefaultTableModel tableModel = (DefaultTableModel) [Link]();
// [Link](0);