1 31 package org.objectweb.proactive.examples.c3d; 32 33 import java.awt.Button ; 34 import java.awt.Dialog ; 35 import java.awt.Frame ; 36 import java.awt.Label ; 37 import java.awt.Panel ; 38 import java.awt.event.ActionEvent ; 39 import java.awt.event.ActionListener ; 40 41 public class MsgDialog extends Dialog implements ActionListener { 42 43 Button bOk = new Button ("OK"); 44 45 46 public MsgDialog(Frame frame, String title, String content) { 47 super(frame, title, false); 48 add("North", new Label (content, Label.CENTER)); 49 Panel panel = new Panel (); 50 51 panel.add(bOk); 52 bOk.addActionListener(this); 53 bOk.setActionCommand("OK"); 54 add("South", panel); 55 setSize(200, 50); 56 pack(); 57 } 58 59 60 public void actionPerformed(ActionEvent event) { 61 dispose(); 62 } 63 } 64 | Popular Tags |