JOptionPane边框的颜色 [英] Color of JOptionPane border

查看:128
本文介绍了JOptionPane边框的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该如何更改JOptionPane's border的颜色?

以下是我正在谈论的边框的屏幕截图:

Here is a screenshot of the border I am talking about:

那个蓝色的边框是我想要摆脱的.

That blue border is what I am trying to get rid of.

我尝试为LookAndFeel设置UIManager.put("OptionPane.border", new BorderFactory...),但这改变了内部边框,而不是最外部的边框.

I tried to set UIManager.put("OptionPane.border", new BorderFactory...)for LookAndFeel but that changed the inside border, not the outermost one.

我需要摆脱那个蓝色边框.

I need to get rid of that blue border.

有什么想法吗?

-标记

推荐答案

阅读JOptionPane API.它显示了如何手动创建JOption窗格,以便您可以访问JDialog.拥有JDialog之后,您可以按照上一个问题中的相同方法删除边框:

Read the JOptionPane API. It shows you how to create a JOption pane manually so that you have access to the JDialog. Once you have the JDialog you can remove the Border the same way you did in your last question:

未修饰的JDialog边框

这篇关于JOptionPane边框的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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