简单的Java窗口代码,帮忙制作一个java窗口程序

1,帮忙制作一个java窗口程序本类在写一个方法来添加这些组件 。public class Loginpublic static void main(String args[])class LoginFrm extends JFrame implements ActionListenerpublic void inio()public void actionPerformed(ActionEvent e) 【简单的Java窗口代码,帮忙制作一个java窗口程序】
2,一个简单的java窗体代码要有格式太乱了用不了import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;public class FileCopy { public static void main(String[] args) throws IOException { FileInputStream fis = new FileInputStream("E:\\上报文档\\协议.doc"); FileOutputStream fos = new FileOutputStream("E:\\上报文档\\协议附件.doc"); byte[] bs = new byte[1024]; int len = -1; while ((len = fis.read(bs)) != -1) { fos.write(bs, 0, len); } fos.flush(); fos.close(); fis.close(); }}
3,java程序设计一个窗口这是以前学习Java时练习的,文件名为BorderLayoutTest.javaimport java.awt.*;public class BorderLayoutTest public static void main(String args[])Frame f=new Frame("BorderLayout Test");Button b1=new Button("One");Button b2=new Button("Two");Button b3=new Button("Three");Button b4=new Button("Four");Button b5=new Button("Five");f.add(b1,BorderLayout.EAST);f.add(b2,BorderLayout.SOUTH);f.add(b3,BorderLayout.WEST);f.add(b4,BorderLayout.NORTH);f.add(b5,BorderLayout.CENTER);f.setLocation(300,300);f.pack();f.setVisible(true); }}import javax.swing.*;import java.awt.*;import java.awt.event.*;public class MyFramepublic static void main(String[] args)JFrame f=new JFrame("mybole");f.setSize(600,400);f.setLocation(100,100);f.setBackground(Color.blue);f.addWindowListener(new WindowAdapter()public void windowClosing(WindowEvent e)System.exit(0);}});f.show();}}最简单的窗口程序1写出一个类people, public class peopleprotected string name; protected int age; public int getage() return age; } } class employee extends peopleprotected string empno; } class teacher extends peopleprotected string teano; protected string zc; } 2application程序public class apublic static void main(string args[])system.out.println("hello world!");}}applet程序public class b extends java.applet.appletpublic paint(java.awt.graphics g)g.outstring("hello world!",10,10);}}

    推荐阅读