<small id='TKMe4'></small><noframes id='TKMe4'>

        <bdo id='TKMe4'></bdo><ul id='TKMe4'></ul>
      <tfoot id='TKMe4'></tfoot>
      <i id='TKMe4'><tr id='TKMe4'><dt id='TKMe4'><q id='TKMe4'><span id='TKMe4'><b id='TKMe4'><form id='TKMe4'><ins id='TKMe4'></ins><ul id='TKMe4'></ul><sub id='TKMe4'></sub></form><legend id='TKMe4'></legend><bdo id='TKMe4'><pre id='TKMe4'><center id='TKMe4'></center></pre></bdo></b><th id='TKMe4'></th></span></q></dt></tr></i><div id='TKMe4'><tfoot id='TKMe4'></tfoot><dl id='TKMe4'><fieldset id='TKMe4'></fieldset></dl></div>
      <legend id='TKMe4'><style id='TKMe4'><dir id='TKMe4'><q id='TKMe4'></q></dir></style></legend>

      1. 带有最大化按钮的 Java 模态窗口

        Java modal window with maximize button(带有最大化按钮的 Java 模态窗口)

          <tfoot id='sUpfH'></tfoot>

              <i id='sUpfH'><tr id='sUpfH'><dt id='sUpfH'><q id='sUpfH'><span id='sUpfH'><b id='sUpfH'><form id='sUpfH'><ins id='sUpfH'></ins><ul id='sUpfH'></ul><sub id='sUpfH'></sub></form><legend id='sUpfH'></legend><bdo id='sUpfH'><pre id='sUpfH'><center id='sUpfH'></center></pre></bdo></b><th id='sUpfH'></th></span></q></dt></tr></i><div id='sUpfH'><tfoot id='sUpfH'></tfoot><dl id='sUpfH'><fieldset id='sUpfH'></fieldset></dl></div>
            • <legend id='sUpfH'><style id='sUpfH'><dir id='sUpfH'><q id='sUpfH'></q></dir></style></legend>
            • <small id='sUpfH'></small><noframes id='sUpfH'>

                <tbody id='sUpfH'></tbody>
                  <bdo id='sUpfH'></bdo><ul id='sUpfH'></ul>
                  本文介绍了带有最大化按钮的 Java 模态窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何创建一个模态窗口并具有最大化按钮?
                  那么是否可以创建一个模态 JFrame 或创建一个带有最大化按钮的 JDialog ?

                  How could I create a window which is modal and has a maximize button?
                  So is it possible to create a modal JFrame or create a JDialog with maximize button?

                  推荐答案

                  在大多数外观和感觉上,模态窗口(例如 JDialog)没有最大化按钮只是因为它们不应该完全最大化(或最小化).

                  On most look and feels, modal windows (such as JDialog) do not have a maximise button simply because they're not supposed to be maximised (or minimised) at all.

                  通过一些技巧可以添加 maximise 按钮,但这完全违背了 JDialog 的工作方式.如果您需要最大化按钮,最好的解决方案是使用 JWindowJFrame 而不是 JDialog.这些窗口支持最大化和最小化.

                  It's possible with some tricks to add a maximise button, but it would be completly against the way JDialog is supposed to work. If you need a maximise button, the best solution would be using a JWindow or a JFrame instead of a JDialog. Those windows support maximisation and minimisation.

                  警告:无论如何你都不应该这样做.

                  WARNING: You shouldn't do that, no matter what.

                  JDialog 中执行此操作的技巧:

                  A trick to do this in JDialog:

                  setUndecorated(true);
                  getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
                  

                  这篇关于带有最大化按钮的 Java 模态窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Compiling C++ for the JVM(为 JVM 编译 C++)
                  Compile to java bytecode (without using Java)(编译成java字节码(不使用Java))
                  How to drive C#, C++ or Java compiler to compute 1+2+3+...+1000 at compile time?(如何在编译时驱动 C#、C++ 或 Java 编译器计算 1+2+3+...+1000?)
                  Java ClassLoader: load same class twice(Java ClassLoader:两次加载相同的类)
                  How to debug .class files in ECLIPSE?(如何在 ECLIPSE 中调试 .class 文件?)
                  Java quot;The blank final field may not have been initializedquot; Anonymous Interface vs Lambda Expression(Java“可能尚未初始化空白的最终字段匿名接口与 Lambda 表达式)
                      <tbody id='HAEkL'></tbody>

                    <small id='HAEkL'></small><noframes id='HAEkL'>

                      <i id='HAEkL'><tr id='HAEkL'><dt id='HAEkL'><q id='HAEkL'><span id='HAEkL'><b id='HAEkL'><form id='HAEkL'><ins id='HAEkL'></ins><ul id='HAEkL'></ul><sub id='HAEkL'></sub></form><legend id='HAEkL'></legend><bdo id='HAEkL'><pre id='HAEkL'><center id='HAEkL'></center></pre></bdo></b><th id='HAEkL'></th></span></q></dt></tr></i><div id='HAEkL'><tfoot id='HAEkL'></tfoot><dl id='HAEkL'><fieldset id='HAEkL'></fieldset></dl></div>
                        <bdo id='HAEkL'></bdo><ul id='HAEkL'></ul>

                          1. <legend id='HAEkL'><style id='HAEkL'><dir id='HAEkL'><q id='HAEkL'></q></dir></style></legend>

                            <tfoot id='HAEkL'></tfoot>