Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //myFrame
- import java.awt.*;
- import javax.swing.*;
- public class myFrame extends JFrame
- {
- //Create instance of P1, P2
- private P1 p1 = new P1();
- private P2 p2 = new P2();
- public myFrame()
- {
- super();
- setLayout(new BorderLayout());
- add(p1, BorderLayout.EAST);
- add(p2, BorderLayout.CENTER);
- setSize(500, 400);
- setVisible(true);
- }
- public static void main(String[] Args)
- {
- myFrame mF = new myFrame();
- mF.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement