Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Pertemuan 13(JMenu)

Pertemuan 13(JMenu)

Ratings: (0)|Views: 636|Likes:
Published by Kang Asep
modul java swing
modul java swing

More info:

Published by: Kang Asep on Sep 11, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/11/2011

pdf

text

original

 
Modul Pelatihan java Swing Asep Komarudin
 Jmenu
 Jmenu adalah komponen yang digunakan unutuk membaut menu.menu membuatprogram lebih terlihat sederhana dan mudah digunakan.Construktor pada jmenu:contoh:public class Menu extends JFrame{JMenuBar menuBar=new JMenuBar();JMenu file=new JMenu("File");JMenu help=new JMenu("Help");JMenuItem open=new JMenuItem("Open");JMenuItem close=new JMenuItem("Close");JMenuItem quite=new JMenuItem("Quit");JMenuItem about=new JMenuItem("About");public Menu() {setTitle("Menu Utame");setSize(320, 160);setLocation(300, 200);setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);}public void TampilMenu(){setJMenuBar(menuBar);menuBar.add(file);menuBar.add(help);file.add(open);file.add(close);aasseepp@gmail.comPage 1
 
Modul Pelatihan java Swing Asep Komarudin
close.setEnabled(false);file.add(quite);help.add(about);setVisible(true);open.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent ae) {JOptionPane.showMessageDialog(null, "Tamilan open");}});quite.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent ae) {System.exit(0);}});}/*** @param args the command line arguments*/public static void main(String[] args) {// TODO code application logic hereMenu m=new Menu();m.TampilMenu();}}aasseepp@gmail.comPage 2

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->