sms-oop
sms-oop
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.table.DefaultTableModel;
frame.setLayout(new BorderLayout(1,1));
frame.setVisible(true);
frame.setSize(900, 600);
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setIconImage(image1.getImage());
label1.setForeground(Color.WHITE);
north.setVisible(true);
north.setBackground(Color.DARK_GRAY);
north.setPreferredSize(new Dimension(900,70));
north.add(label1);
admin.setText("ADMIN");
admin.setForeground(Color.BLACK);
admin1.setText("admin 1");
admin1.setBackground(Color.WHITE);
admin1.setOpaque(true);
admin1.setForeground(Color.BLACK);
admin1.setIcon(newImage);
admin2.setBackground(Color.WHITE);
admin2.setOpaque(true);
admin2.setForeground(Color.BLACK);
admin2.setIcon(newImage);
admin3.setText("admin 3");
admin3.setBackground(Color.WHITE);
admin3.setOpaque(true);
admin3.setForeground(Color.BLACK);
admin3.setIcon(newImage);
admin4.setText("admin 4");
admin4.setBackground(Color.WHITE);
admin4.setOpaque(true);
admin4.setForeground(Color.BLACK);
admin4.setIcon(newImage);
admin5.setText("admin 5");
admin5.setOpaque(true);
admin5.setForeground(Color.BLACK);
admin5.setIcon(newImage);
west.setVisible(true);
west.setBackground(Color.GRAY);
west.add(admin);
west.add(admin1);
west.add(admin2);
west.add(admin3);
west.add(admin4);
west.add(admin5);
manageStudent.setText("MANAGE STUDENT");
manageStudent.setForeground(Color.BLACK);
name.setPreferredSize(new Dimension(200,30));
id.setPreferredSize(new Dimension(200,30));
comBox.setPreferredSize(new Dimension(200,30));
model.setPreferredSize(new Dimension(200,30));
male.setText("Male");
male.setBackground(Color.GRAY);
male.setFocusable(false);
female.setText("Female");
female.setBackground(Color.GRAY);
female.setFocusable(false);
ButtonGroup group1 = new ButtonGroup();
group1.add(male);
group1.add(female);
a.setLayout(new BorderLayout());
a.setBackground(Color.GRAY);
a.setPreferredSize(new Dimension(300,30));
a.add(label2, BorderLayout.WEST);
a.add(name,BorderLayout.EAST );
b2.setLayout(new BorderLayout());
b2.setBackground(Color.GRAY);
b2.setPreferredSize(new Dimension(300,30));
b2.add(label3, BorderLayout.WEST);
b2.add(id, BorderLayout.EAST);
c.setLayout(new BorderLayout());
c.setBackground(Color.GRAY);
c.setPreferredSize(new Dimension(300,30));
c.add(label4, BorderLayout.WEST);
c.add(comBox, BorderLayout.EAST);
d.setLayout(new GridLayout(1,3));
d.setBackground(Color.GRAY);
d.setPreferredSize(new Dimension(300,30));
d.add(label5 );
d.add(male);
d.add(female);
e.setLayout(new BorderLayout());
e.setBackground(Color.GRAY);
e.setPreferredSize(new Dimension(300,30));
e.add(label6, BorderLayout.WEST);
e.add(model, BorderLayout.EAST);
e1.setLayout(new BorderLayout());
e1.setBackground(Color.GRAY);
e1.setPreferredSize(new Dimension(300,30));
e1.add(label7, BorderLayout.WEST);
e2.setLayout(new BorderLayout());
e2.setBackground(Color.WHITE);
e2.setPreferredSize(new Dimension(300,160));
center.setVisible(true);
center.setBackground(Color.GRAY);
center.setPreferredSize(new Dimension(350,460));
center.add(manageStudent, BorderLayout.NORTH);
center.add(a);
center.add(b2);
center.add(c);
center.add(d);
center.add(e);
center.add(e1);
center.add(e2);
label.setText("Search");
label.setForeground(Color.BLACK);
search.setPreferredSize(new Dimension(220,30));
b.setFocusable(false);
b.setPreferredSize(new Dimension(80,30));
b.addActionListener(new ActionListener () {
System.out.println(search.getText());
});
add.setPreferredSize(new Dimension(100,30));
add.setFocusable(false);
page.setText("Page 1 of 10");
page.setForeground(Color.BLACK);
page.setHorizontalAlignment(JLabel.CENTER);
prev.setFocusable(false);
prev.setPreferredSize(new Dimension(100,30));
next.setFocusable(false);
next.setPreferredSize(new Dimension(100,30));
f.setLayout(new BorderLayout());
f.setBackground(Color.GRAY);
f.setPreferredSize(new Dimension(360,30));
f.add(add, BorderLayout.WEST);
g.setLayout(new BorderLayout());
g.setBackground(Color.GRAY);
g.setPreferredSize(new Dimension(360,280));
g.add(scrollPane);
h.setLayout(new BorderLayout());
h.setBackground(Color.GRAY);
h.setPreferredSize(new Dimension(360,30));
h.add(prev, BorderLayout.WEST);
h.add(page,BorderLayout.CENTER);
h.add(next, BorderLayout.EAST);
east.setVisible(true);
east.setBackground(Color.GRAY);
east.setPreferredSize(new Dimension(400,460));
east.add(label);
east.add(search);
east.add(b);
east.add(f);
east.add(g);
east.add(h);
south.setVisible(true);
south.setForeground(Color.GRAY);
south.setPreferredSize(new Dimension(900,70));
south.setLayout(new BorderLayout(2,0));
// ------------------INSIDE SOUTH PANEL--------------------------
aboutUs.setText("ABOUT US");
aboutUs.setForeground(Color.BLACK);
services.setText("OUR SERVICES");
services.setForeground(Color.BLACK);
contacts.setText("CONTACT US");
contacts.setForeground(Color.BLACK);
southWest.setBackground(Color.LIGHT_GRAY);
southCenter.setBackground(Color.LIGHT_GRAY);
southEast.setBackground(Color.LIGHT_GRAY);
southWest.setPreferredSize(new Dimension(300,70));
southCenter.setPreferredSize(new Dimension(300,70));
southEast.setPreferredSize(new Dimension(300,70));
contact1.setText("AJ Gonzales");
contact1.setForeground(Color.WHITE);
contact1.setIcon(newImage2);
contact2.setText("ajbrineg@gmail.com");
contact2.setForeground(Color.WHITE);
contact2.setIcon(newImage3);
JPanel Contact = new JPanel();
Contact.setLayout(new BorderLayout());
Contact.setBackground(Color.LIGHT_GRAY);
Contact.setPreferredSize(new Dimension(250,30));
Contact.add(contact1, BorderLayout.NORTH);
Contact.add(contact2, BorderLayout.SOUTH);
service1.setForeground(Color.WHITE);
service2.setForeground(Color.WHITE);
JLabel about = new JLabel(" We provide streamlined, secure student data ");
about.setForeground(Color.WHITE);
about1.setForeground(Color.WHITE);
southWest.add(aboutUs);
southWest.add(about);
southWest.add(about1);
southCenter.add(services);
southCenter.add(service1);
southCenter.add(service2);
southEast.add(contacts);
southEast.add(Contact);
south.add(southWest,BorderLayout.WEST);
south.add(southCenter,BorderLayout.CENTER);
south.add(southEast,BorderLayout.EAST);
//----------------------------------------------
frame.add(north,BorderLayout.NORTH);
frame.add(west,BorderLayout.WEST);
frame.add(east,BorderLayout.EAST);
frame.add(center,BorderLayout.CENTER);
frame.add(south,BorderLayout.SOUTH);
frame.setVisible(true);