⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e841. creating a jdesktoppane container.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
A desktop is a container that can only hold internal frames (JInternalFrame objects). This example creates a desktop with an internal frame. 
    // Create an internal frame
    boolean resizable = true;
    boolean closeable = true;
    boolean maximizable  = true;
    boolean iconifiable = true;
    String title = "Frame Title";
    JInternalFrame iframe = new JInternalFrame(title, resizable, closeable, maximizable, iconifiable);
    
    // Set an initial size
    int width = 200;
    int height = 50;
    iframe.setSize(width, height);
    
    // By default, internal frames are not visible; make it visible
    iframe.setVisible(true);
    
    // Add components to internal frame...
    iframe.getContentPane().add(new JTextArea());
    
    // Add internal frame to desktop
    JDesktopPane desktop = new JDesktopPane();
    desktop.add(iframe);
    
    // Display the desktop in a top-level frame
    JFrame frame = new JFrame();
    frame.getContentPane().add(desktop, BorderLayout.CENTER);
    frame.setSize(300, 300);
    frame.setVisible(true);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -