|
What this is
Other links
The source code/* * AFrame.java * * Created on July 20, 2004, 3:31 PM */ package org.netbeans.tests.examples.packc; /** * * @author eh103527 */ public class AFrame extends javax.swing.JFrame { int counter; /** Creates new form AFrame */ public AFrame() { initComponents(); button.setText("Hello"); } /** 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. */ private void initComponents() {//GEN-BEGIN:initComponents jPanel1 = new javax.swing.JPanel(); button = new javax.swing.JButton(); jPanel2 = new BPanel(); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { exitForm(evt); } }); button.setText("Button A"); button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buttonActionPerformed(evt); } }); jPanel1.add(button); getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH); getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER); pack(); }//GEN-END:initComponents private void buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonActionPerformed // TODO add your handling code here: }//GEN-LAST:event_buttonActionPerformed /** Exit the Application */ private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm System.exit(0); }//GEN-LAST:event_exitForm /** * @param args the command line arguments */ public static void main(String args[]) { new AFrame().show(); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton button; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; // End of variables declaration//GEN-END:variables } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.