Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package login;
- import java.awt.Cursor;
- public class Frame_Utama {
- public JFrame frame_utama;
- private JButton btnLogOut;
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- Frame_Utama window = new Frame_Utama();
- window.frame_utama.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- public Frame_Utama() {
- initialize();
- }
- private void initialize() {
- frame_utama = new JFrame();
- frame_utama.getContentPane().setFont(new Font("Verdana", Font.PLAIN, 12));
- frame_utama.getContentPane().setLayout(null);
- frame_utama.setBounds(100, 100, 450, 300);
- frame_utama.setTitle("Frame Utama");
- frame_utama.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame_utama.setExtendedState(JFrame.MAXIMIZED_BOTH);
- btnLogOut = new JButton("LOG OUT");
- btnLogOut.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- // Event Button Log Out
- Frame_Login fl = new Frame_Login();
- fl.frame_login.setVisible(true);
- frame_utama.setVisible(false);
- }
- });
- btnLogOut.setFont(new Font("Verdana", Font.PLAIN, 12));
- btnLogOut.setBounds(106, 111, 106, 40);
- btnLogOut.setCursor(new Cursor(Cursor.HAND_CURSOR));
- frame_utama.getContentPane().add(btnLogOut);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement