delete=new JButton(\删除\ change=new JButton(\修改\ yearbox=new JComboBox
addbutton.setContentAreaFilled(false); addbutton.setBorderPainted(false);
text1=new JTextArea(13,17);
text2=new JTextArea(13,17);//需要删除 text3=new JTextArea(6,24); text1.setEditable(false);
text2.setEditable(false);//需要删除 add(music); add(nltext); add(save); add(cancel1); add(delete); add(change); add(text1); add(text2); add(text3);
nltext.setBounds(66,135,200,49); music.setBounds(180,180,30,39);
save.setBounds(180,210,60,25);
cancel1.setBounds(250,210,60,25); delete.setBounds(250,210,60,25); change.setBounds(180,210,60,25); text1.setBounds(7,7,300,200); text2.setBounds(7,7,300,200); text3.setBounds(7,7,300,90); sldday.setBounds(10,98,77,50); yearbox.setBounds(100,113,53,20); yearlabel.setBounds(158,112,20,20); monthbox.setBounds(175,113,40,20); monthlabel.setBounds(220,112,20,20); daybox.setBounds(238,113,40,20); daylabel.setBounds(283,112,20,20); sldtime.setBounds(50,140,77,50); hourbox.setBounds(140,155,40,20); mhlabel.setBounds(186,155,40,20); minutebox.setBounds(200,155,40,20); yes.setBounds(90,190,60,25); cancel.setBounds(160,190,60,25);
music.setVisible(false);
save.setVisible(false); cancel1.setVisible(false); sldday.setVisible(false); yearbox.setVisible(false); yearlabel.setVisible(false); monthbox.setVisible(false); monthlabel.setVisible(false); daybox.setVisible(false); daylabel.setVisible(false); sldtime.setVisible(false); hourbox.setVisible(false); mhlabel.setVisible(false); minutebox.setVisible(false); text1.setVisible(false);
text2.setVisible(false); text3.setVisible(false); text1.setLineWrap(true); text2.setLineWrap(true); text3.setLineWrap(true); delete.setVisible(false); change.setVisible(false); nltext.setEditable(false);
add(sldday); add(yearbox); add(yearlabel); add(monthbox); add(monthlabel); add(daybox); add(daylabel); add(sldtime); add(hourbox); add(mhlabel); add(minutebox); add(yes); add(cancel);
yes.setVisible(false); cancel.setVisible(false);
yes.setFont(new \
setVisible(true);
java.awt.Font(\宋体
for(int i=1900;i<=3000;i++){ yearbox.addItem(i+\ }
yearbox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { yearboxActionPerformed(e); } });
for(int i=1;i<=12;i++){ if(i<10){
monthbox.addItem(\ }
if(i>=10){
monthbox.addItem(i+\ } }
monthbox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { monthboxActionPerformed(e); } });
相关推荐: