All pastes #405754 Raw Edit

Paul Ingham

public java v1 · immutable
·published 2007-03-21 22:23 UTC
rendered paste body
public class diaryForm extends javax.swing.JFrame {        Day day1;    newEntry addnew;    /** Creates new form diaryForm */    public diaryForm() {        initComponents();    }        /** This method is called from within the constructor to     * initialize the form.     * WARNING: Do NOT modify this code. The content of this method is     * always regenerated by the Form Editor.     */    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                              private void initComponents() {        jPanel1 = new javax.swing.JPanel();        lblEntries = new javax.swing.JLabel();        btnGetEvents = new javax.swing.JButton();        btnAddNew = new javax.swing.JButton();        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);        lblEntries.setText("Appointments for Today:");        btnGetEvents.setText("Get Events!");        btnGetEvents.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                btnGetEventsActionPerformed(evt);            }        });        btnAddNew.setText("Add New");        btnAddNew.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                btnAddNewActionPerformed(evt);            }        });        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);        jPanel1.setLayout(jPanel1Layout);        jPanel1Layout.setHorizontalGroup(            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)            .add(jPanel1Layout.createSequentialGroup()                .addContainerGap()                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)                    .add(jPanel1Layout.createSequentialGroup()                        .add(btnAddNew)                        .add(90, 90, 90)                        .add(btnGetEvents))                    .add(lblEntries))                .addContainerGap(108, Short.MAX_VALUE))        );        jPanel1Layout.setVerticalGroup(            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)            .add(jPanel1Layout.createSequentialGroup()                .addContainerGap()                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)                    .add(btnGetEvents)                    .add(btnAddNew))                .add(68, 68, 68)                .add(lblEntries)                .addContainerGap(238, Short.MAX_VALUE))        );        getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 400, 360));        pack();    }// </editor-fold>                            private void btnAddNewActionPerformed(java.awt.event.ActionEvent evt) {                                                  addnew = new newEntry();        addnew.setVisible(true);    }                                             private void btnGetEventsActionPerformed(java.awt.event.ActionEvent evt) {                                                    day1.showAppointments();    }     }