extends 
Frame______________ Windows

解决方案 »

  1.   

    frame是一个窗体,包括标题栏,边框等。主要用于一个应用程序的主题框架结构。
    window是一个窗口,什么都没有,包括边框。并且要放在一个frame之上,当然也可放在一个共享的Frame上(系统提供),主要应用于快闪窗口,也就是应用程序运行前的哪个屏幕居中显示的图片窗。在swing中的工具按钮提示(tooltip)也是用窗口的方式实现的。
      

  2.   

    A Frame is a top-level window with a title and a border. A Window object is a top-level window with no borders and no menubar. The default layout for a window is BorderLayout. A window must have either a frame, dialog, or another window defined as its owner when it's constructed. 
      

  3.   

    import java.awt.*;
    import java.awt.event.*;public class FrameWindow extends Frame
    {        
    public FrameWindow()
    {
            Window win = new Window(this);
            win.setBackground(Color.lightGray);
            setSize(300,200);
            setTitle("Frame");
            addWindowListener(new WindowAdapter(){
             public void windowClosing(WindowEvent e){
             System.exit(0);
             }
            });
            show();
            win.setSize(360,200);
            win.setLocation(200,200);
            win.show();
        }
        public static void main(String args[])
        {
         new FrameWindow();    
        }    
    }