Swing 自定义 GUI 组件 [英] Swing Custom GUI Component

查看:51
本文介绍了Swing 自定义 GUI 组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个自定义 GUI 组件,如下图所示.它上面有一些按钮和标签.

I need to create a custom GUI Component about same like shown in the following image. it has some buttons and labels on this.

我怎样才能像这样创建

推荐答案

您可以使用 JWindow,并使用 Image 作为背景图片.对于按钮,使用带有 ImageIcon 的 JButton.

You could use a JWindow, with an Image for the background picture. For the buttons, use a JButton with an ImageIcon.

这篇关于Swing 自定义 GUI 组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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