Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 java swing 应用程序,我使用 Borderlayout 作为布局。我将元素放在 EAST、CENTER 和 WEST 中。我想用鼠标改变元素的大小,就像在 NetBeans 中一样。例如,当我在中心边缘移动鼠标时,我需要显示鼠标调整大小光标。当我在边缘拖动鼠标时,CENTER 会相应地改变大小。最好的方法是什么?
您需要使用JSplitPane。只需将它们嵌套在边框布局中。这是一个很好的示例资源。