{{{~cpp import java.awt.*; import java.awt.event.*; import javax.swing.*; public class AppletTest extends JApplet implements ActionListener { JButton 버튼1, 버튼2 ; Icon ì•„ì´ì½˜; Font font; public void init() { 버튼1 = new JButton("1번"); 버튼1.addActionListener(this); 버튼2 = new JButton("2번"); 버튼2.addActionListener(this); ì•„ì´ì½˜ = new ImageIcon("aaa.jpg"); JPanel panel = new JPanel(); panel.add(버튼1); panel.add(버튼2); getContentPane().add(panel); } public void actionPerformed(ActionEvent ae) { if (ae.getSource() == 버튼1) { JOptionPane.showMessageDialog( this, "1번", "1ë²ˆì„ íƒ", JOptionPane.YES_NO_OPTION, ì•„ì´ì½˜); } else if (ae.getSource() == 버튼2) { Object res = JOptionPane.showInputDialog( this, "2번", "2ë²ˆì„ íƒ", JOptionPane.QUESTION_MESSAGE, ì•„ì´ì½˜, new Object[] { "2-1", "2-2", "2-3" }, "2-1"); JOptionPane.showMessageDialog( this, "ì„ íƒí•œ 것: " + res, "ì„ íƒê²°ê³¼", JOptionPane.INFORMATION_MESSAGE, ì•„ì´ì½˜); } } } }}} ---- ["JavaStudyInVacation/ì§„í–‰ìƒí™©"]