JFrame可不可以让它在最前面显示,显示在应用程序的最上层?

解决方案 »

  1.   

    public final void setAlwaysOnTop(boolean alwaysOnTop) throws SecurityException
      

  2.   

    frame.setAlwaysOnTop(true);这些JDK的文档上都有的,要学会查文档。
      

  3.   

    public class Test extends JFrame{    private Test() {
            this.setUndecorated(true);
            this.setResizable(false);
            this.setSize(300, 115);
            this.setAlwaysOnTop( true );
            this.setVisible(true);
        }
    }这样它不会在最上面
      

  4.   

    private static ...Frame prarentFrame = OMTFrame.get...FrameHandle();