Guest User

Untitled

a guest
May 27th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import java.awt.*;
  2. import javax.swing.*;
  3. class MyJFrame01 extends JFrame{
  4. private JMenuBar menubar;
  5. private JMenu menu;
  6. MyJFrame01(String title){
  7. menubar = new JMenuBar();
  8. menu = new JMenu("メニュー");
  9. menubar.add(menu);
  10. setJMenuBar(menubar);
  11. setTitle(title);
  12. setSize(400,400);
  13. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  14. setVisible(true);
  15. }
  16. }
  17. public class MenuProg01{
  18. public static void main(String[] args){
  19. MyJFrame01 frame = new MyJFrame01("メニュー作成_01");
  20. }
  21. }
Add Comment
Please, Sign In to add comment