Java 在Swing中使用JDesktopPane滚动控件

Java 在Swing中使用JDesktopPane滚动控件,java,swing,scroll,jscrollpane,jdesktoppane,Java,Swing,Scroll,Jscrollpane,Jdesktoppane,我已经使用netbeans在JPanel上设计了swing控件,现在我希望该控件应该通过单击Jscrollbar或JSlider滚动 Suppose i have four buttons on the jpanel from then they should appear one by one from right to left while clicking on the jscrollbar or jslider. 您正在寻找。尝试时发生了什么?实际上,我想进行滚动,因为单屏幕应该在

我已经使用netbeans在JPanel上设计了swing控件,现在我希望该控件应该通过单击Jscrollbar或JSlider滚动

Suppose i have four buttons on the jpanel from then they should appear one by one from  
right to left while clicking on the jscrollbar or jslider.

您正在寻找。

尝试时发生了什么?实际上,我想进行滚动,因为单屏幕应该在左侧或右侧滚动,您的意图不清楚。请编辑您的问题,以包含一个显示您尝试过的内容的列表。一个简单的图表可能会有所帮助。