All pastes #428724 Raw Edit

Untitled

public java v1 · immutable
·published 2007-04-07 19:47 UTC
rendered paste body
import javax.swing.JFrame;public class Main extends javax.swing.JFrame {         public Main() {        initComponents();    }  @@    private void initComponents() {        jComboBox1 = new javax.swing.JComboBox();        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);        jComboBox1.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {                jComboBox1PopupMenuCanceled(evt);            }            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {                jComboBox1PopupMenuWillBecomeInvisible(evt);            }            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {                jComboBox1PopupMenuWillBecomeVisible(evt);            }        });        getContentPane().add(jComboBox1, java.awt.BorderLayout.CENTER);        pack();    }                            private void jComboBox1PopupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {                                                 System.out.println("Popup Menu Cancelled");    }                                                private void jComboBox1PopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {                                                            System.out.println("Popup Menu Will Become Invisible");    }                                                           private void jComboBox1PopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {                                                          System.out.println("Popup Menu Will Become Visible");    }                                                             /**     * @param args the command line arguments     */    public static void main(String args[]) {        final JFrame frame = new Main();        java.awt.EventQueue.invokeLater(new Runnable() {            public void run() {                frame.setVisible(true);                            }        });            }        private javax.swing.JComboBox jComboBox1;    }