📄 dialog1.java
字号:
/* * Dialog1.java * * Created on 2004年9月18日, 下午10:18 *//** * * @author litertiger */public class Dialog1 extends javax.swing.JDialog { /** Creates new form Dialog1 */ public Dialog1(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); } public Dialog1(int x) { switch(x){ case 1:jLabel1.setText("1月31天");break; case 2:jLabel1.setText("1月28天");break; case 3:jLabel1.setText("1月31天");break; case 4:jLabel1.setText("1月30天");break; case 5:jLabel1.setText("1月31天");break; case 6:jLabel1.setText("1月30天");break; case 7:jLabel1.setText("1月31天");break; case 8:jLabel1.setText("1月31天");break; case 9:jLabel1.setText("1月30天");break; case 10:jLabel1.setText("1月31天");break; case 11:jLabel1.setText("1月30天");break; case 12:jLabel1.setText("1月31天");break; } } /** 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 jLabel1 = new javax.swing.JLabel(); getContentPane().setLayout(null); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText("jLabel1"); jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); getContentPane().add(jLabel1); jLabel1.setBounds(20, 20, 370, 30); pack(); }//GEN-END:initComponents /** * @param args the command line arguments */ public static void main(String args[]) { new Dialog1(new javax.swing.JFrame(), true).show(); } // 变量声明 - 不进行修改//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; // 变量声明结束//GEN-END:variables }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -