武汉纺织大学Java闯关题.docxVIP

  • 4
  • 0
  • 约3.42千字
  • 约 4页
  • 2018-01-10 发布于河南
  • 举报
武汉纺织大学Java闯关题

Java闯关题闯关一:importjava.applet.*;importjava.awt.*;publicclassL1extends Applet {publicvoid paint(Graphics g){g.drawString(一个有理想有抱负的青年!,30,30); }}闯关二:importjava.awt.event.*;importjava.awt.*;importjavax.swing.*;public class L2 extends JFrame implements ActionListener {public void actionPerformed(ActionEvent e){wby2.setText(wby1.getText()); } JButtonan1;JTextAreawby1,wby2;L2(){setLayout(null);setSize(600,600);wby1=new JTextArea();wby1.setBackground(Color.RED);wby1.setBounds(100,100,80,80);an1=new JButton(复制);an1.setBounds(190,120,60,30);wby2=new JTextArea();wby2.setBackground(Color.GREEN);wby2

文档评论(0)

1亿VIP精品文档

相关文档