是否可以只在顶部有一个java swing边框? [英] Is it possible to have a java swing border only on the top side?

查看:127
本文介绍了是否可以只在顶部有一个java swing边框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何使用 BorderFactory 创建边框,但是我没有看到任何可以指定我想要边框的边:S

I know how to create borders using BorderFactory but I don't see anything that lets me specify what sides I want the border on :S

推荐答案

来自 Sun教程


下一张图片显示了一些遮罩
的边框。创建遮罩边框时,
指定
占据组件右上角,左上角,下限和
右边的像素数。

The next picture shows some matte borders. When creating a matte border, you specify how many pixels it occupies at the top, left, bottom, and right of a component.

http ://java.sun.com/docs/books/tutorial/figures/uiswing/components/BorderDemo2.png

Java文档

这篇关于是否可以只在顶部有一个java swing边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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