如何在Java中使窗口看起来像这样? [英] How to make a window look like this in Java?

查看:84
本文介绍了如何在Java中使窗口看起来像这样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Java中创建一个如下所示的窗口:

How do I create a window which looks like this in Java:

我想要的是窗口布局,而不是标准的Windows边框,而且我不知道如何称呼它.

I want that window layout, instead of the standard Windows-borders, and I don't know how this is called.

外观对我不起作用:

推荐答案

如果您希望外观来绘制窗户装饰(这就是所谓的边框"),那么您需要调用 JDialog.setDefaultLookAndFeelDecorated(true) 之前创建您的JDialog对象.

If you want your Look and Feel to draw the window decoration (that's what the "border" is called), then you need to call JFrame.setDefaultLookAndFeelDecorated(true) before creating your JFrame objects and JDialog.setDefaultLookAndFeelDecorated(true) before creating your JDialog objects.

这篇关于如何在Java中使窗口看起来像这样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆