timeraboutbox.java#1.2
来自「数据库远程同步软件NetBeans项目源文件 项目采用Jdesktop集成组件」· 2 代码 · 共 361 行 · 第 1/2 页
2
361 行
/* * DataBaseSyncDesktopAboutBox.java */package databasesyncdesktopapplication;import com.qixuan.jdbc.util.CalendarUtil;import eRedLab.datachooser.DateChooser;import java.text.SimpleDateFormat;import java.util.Date;import javax.swing.JOptionPane;import javax.swing.JTextField;import org.jdesktop.application.Action;public class TimerAboutBox extends javax.swing.JDialog { public TimerAboutBox(ChoosePropertiesAboutBox previous, java.awt.Frame parent) { super(parent); initComponents(); dateChooser = new DateChooser(parent); modelGroup.add(modelRadio1); modelGroup.add(modelRadio2); dateField1.setText(new SimpleDateFormat("yyyy年MM月dd日 hh:mm:ss").format(new Date())); dateField2.setText(new SimpleDateFormat("yyyy年MM月dd日 hh:mm:ss").format(new Date())); this.previous = previous; enable = false; getRootPane().setDefaultButton(exitButton); } @Action public void closeAboutBox() { setVisible(false); } /** 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">//GEN-BEGIN:initComponents private void initComponents() { modelGroup = new javax.swing.ButtonGroup(); startCheckBox = new javax.swing.JCheckBox(); jLabel1 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); modelRadio1 = new javax.swing.JRadioButton(); dateField1 = new javax.swing.JTextField(); btnDate1 = new javax.swing.JButton(); jSeparator2 = new javax.swing.JSeparator(); dateField2 = new javax.swing.JTextField(); modelRadio2 = new javax.swing.JRadioButton(); btnDate2 = new javax.swing.JButton(); exitButton = new javax.swing.JButton(); okButton = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(databasesyncdesktopapplication.DataBaseSyncDesktopApplication.class).getContext().getResourceMap(TimerAboutBox.class); setTitle(resourceMap.getString("title")); // NOI18N setModal(true); setName("aboutBox"); // NOI18N setResizable(false); startCheckBox.setText(resourceMap.getString("startCheckBox.text")); // NOI18N startCheckBox.setName("startCheckBox"); // NOI18N startCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { startCheckBoxStateChanged(evt); } }); startCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { startCheckBoxActionPerformed(evt); } }); jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jSeparator1.setName("jSeparator1"); // NOI18N modelRadio1.setText(resourceMap.getString("modelRadio1.text")); // NOI18N modelRadio1.setName("modelRadio1"); // NOI18N modelRadio1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { modelRadio1ActionPerformed(evt); } }); dateField1.setText(resourceMap.getString("dateField1.text")); // NOI18N dateField1.setName("dateField1"); // NOI18N btnDate1.setText(resourceMap.getString("btnDate1.text")); // NOI18N btnDate1.setName("btnDate1"); // NOI18N btnDate1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnDate1MouseClicked(evt); } }); btnDate1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDate1ActionPerformed(evt); } }); jSeparator2.setName("jSeparator2"); // NOI18N dateField2.setText(resourceMap.getString("dateField2.text")); // NOI18N dateField2.setName("dateField2"); // NOI18N modelRadio2.setText(resourceMap.getString("modelRadio2.text")); // NOI18N modelRadio2.setName("modelRadio2"); // NOI18N modelRadio2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { modelRadio2ActionPerformed(evt); } }); btnDate2.setText(resourceMap.getString("btnDate2.text")); // NOI18N btnDate2.setName("btnDate2"); // NOI18N btnDate2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnDate2MouseClicked(evt); } }); exitButton.setText(resourceMap.getString("exitButton.text")); // NOI18N exitButton.setName("exitButton"); // NOI18N exitButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitButtonActionPerformed(evt); } }); okButton.setText(resourceMap.getString("okButton.text")); // NOI18N okButton.setName("okButton"); // NOI18N okButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { okButtonActionPerformed(evt); } }); jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N jButton1.setName("jButton1"); // NOI18N jButton1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jButton1MouseClicked(evt); } }); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 484, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 240, Short.MAX_VALUE) .addComponent(startCheckBox) .addGap(123, 123, 123))) .addGap(42, 42, 42)) .addGroup(layout.createSequentialGroup() .addComponent(modelRadio1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(dateField1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(36, 36, 36) .addComponent(btnDate1) .addContainerGap(194, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 484, Short.MAX_VALUE) .addGap(42, 42, 42))
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?