请教一个关于painting 的问题

fengyepiaoling 2005-07-06 08:26:01

我想在 JSplitPane 的一部分 有一个 JPanel at the BorderLayout.North, a class extends JPanel at the BorderLayout.Center and another JPanel at the BorderLayout.South. The extends class is for drawing.

现在中间的那个class 没变化。

我知道如果在一个JFrame 中做就没问题。这是为什么?


谢谢!

...全文
78 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
hongyan2004 2005-07-10
  • 打赏
  • 举报
回复
study..
fengyepiaoling 2005-07-08
  • 打赏
  • 举报
回复
Thanks,

In the first case, I use a borderlayout manager in a JFrame. I have one JLabel in north, one JPanel extended in center for painting and another JLable in south. Everything is as expected.

In another case, I put a JSplitPane in a JFrame. one half is for trigerring event and the other is for handling the event (painting). I can get the painting shown now.

My problem is when I change the size of the window, the graph will disapper and I have to trigger the event again to see it. But in the first case the displayed graph will change its size with window size.

What I want is to let it have the same display as in the first case.



Hope it is not confusing this time Thanks very much.
fengyepiaoling 2005-07-08
  • 打赏
  • 举报
回复
up again
晨星 2005-07-06
  • 打赏
  • 举报
回复
啥意思?你是想让中间的divider上面有自己的控件吗?

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧