⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 componentform.java

📁 这个项目是为Java平台提供一个灵活的日历组件(Ok)
💻 JAVA
字号:
/* *  NachoCalendar * * Project Info:  http://nachocalendar.sf.net * * This library is free software; you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along with this * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc.  * in the United States and other countries.] * * Changes * ------- * * ComponentForm.java * * Created on December 28, 2005, 2:35 PM */package net.sf.nachocalendar.demo;import java.awt.Component;/** * * @author  Ignacio Merani */public class ComponentForm extends javax.swing.JDialog {        /** Creates new form ComponentForm */    public ComponentForm(java.awt.Frame parent, boolean modal) {        super(parent, modal);        initComponents();        setLocationRelativeTo(parent);    }        public ComponentForm(java.awt.Dialog parent, boolean modal) {        super(parent, modal);        initComponents();        setLocationRelativeTo(parent);    }        /** 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        javax.swing.JPanel jPanel1;        jPanel1 = new javax.swing.JPanel();        bClose = new javax.swing.JButton();        panel = new javax.swing.JPanel();        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);        setTitle("Customizer Demo");        bClose.setText("Close");        bClose.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                bCloseActionPerformed(evt);            }        });        jPanel1.add(bClose);        getContentPane().add(jPanel1, java.awt.BorderLayout.SOUTH);        getContentPane().add(panel, java.awt.BorderLayout.CENTER);        pack();    }//GEN-END:initComponents    private void bCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bCloseActionPerformed        setVisible(false);        dispose();    }//GEN-LAST:event_bCloseActionPerformed        public void addComponent(Component comp) {        panel.add(comp);        pack();    }    // Variables declaration - do not modify//GEN-BEGIN:variables    private javax.swing.JButton bClose;    private javax.swing.JPanel panel;    // End of variables declaration//GEN-END:variables    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -