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

📄 framedemo.java

📁 这是一个英文版的《Java程序设计与问题解决》现在好多大学都当成教材
💻 JAVA
字号:
import java.awt.*;import java.awt.event.*;import javax.swing.*;/* FrameDemo.java requires no other files. */public class FrameDemo {    public static void main(String s[]) {        //Suggest that the L&F (rather than the system)        //decorate all windows.  This must be invoked before        //creating the JFrame.  Native look and feels will        //ignore this hint.        JFrame.setDefaultLookAndFeelDecorated(true);        //Create and set up the window.        JFrame frame = new JFrame("FrameDemo");        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        JLabel emptyLabel = new JLabel("");        emptyLabel.setPreferredSize(new Dimension(175, 100));        frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);        //Display the window.        frame.pack();        frame.setVisible(true);    }}

⌨️ 快捷键说明

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