• 大小: 3.55KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-20
  • 语言: Java
  • 标签:

资源简介

Java 始终在桌面最顶层显示的窗体(基础篇-实例249).zip

资源截图

代码片段和文件信息

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.Jframe;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.UIManager;

public class AlwaysActiveWindows extends Jframe {
    
    private JPanel contentPane;
    
    /**
     * Launch the application.
     */
    public static void main(String[] args) {
        try {
            UIManager
                    .setLookAndFeel(“com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel“);
        } catch (Throwable e) {
            e.printStackTrace();
        }
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    AlwaysActiveWindows frame = new AlwaysActiveWindows();
                    frame.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         301  2010-07-29 11:31  .classpath
     文件         379  2010-09-07 14:03  .project
     文件         635  2010-07-29 11:31  .settings\org.eclipse.jdt.core.prefs
     文件         742  2013-11-21 08:41  bin\AlwaysActiveWindows$1.class
     文件        1610  2013-11-21 08:41  bin\AlwaysActiveWindows.class
     文件        1724  2010-07-29 13:41  src\AlwaysActiveWindows.java

评论

共有 条评论