摆动垂直导航菜单 [英] Swing vertical Navigation Menu

查看:69
本文介绍了摆动垂直导航菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Swing创建桌面应用程序并进行设计.我在框架的左面板和右面板中有两个面板,在左面板中有按钮,所以我希望当我从左面板单击按钮时,它应该在同一框架的右面板中显示结果.我是否需要用相同的左面板创建另一个框架并为该链接创建一个右面板,还是上面的书面方法不知道如何执行此操作?就像下面的图片所示.

I am creating desktop application and design using Swing. i have two panels in frame left and right panel, In the left panel I have buttons, So i want that when i click on button from left panel it should display the result in right panel on same frame. Does i need to create another frame with same left panel and create a right panel for the link , or there is a way for above written method have no idea that how to do this. Like Shown in below Image.

推荐答案

我会这样布置(还有其他方法).

I'd lay it out like this (there are other ways as well).

  • BorderLayout
  1. GridBagLayout(LINE_START)
    • GridLayout
  1. GridBagLayout (LINE_START)
    • GridLayout
  1. 按钮1
  2. 按钮2
  3. 按钮3
  4. 按钮4

  • 卡片面板1
  • 卡片面板2
  • 卡片面板3
  • 卡面板4

这篇关于摆动垂直导航菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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