JScrollPane scroll on the top page when the submit button click - java

Is it possible in Java Netbeans for the jScrollPanel to scroll automatically return to te top when a submit button click? Any idea?

You can use the JScrollPane's JViewport's setViewPosition to change the position of the top/left corner of the view.
See How to Use Scroll Panes for more details

Related

I can't set a border to Jpanel in java

according to the picture above, when I click on border property, it dosesn't show me border and title border to select the border and show this picture above.
before it did work correctly and show border to select
I don't know what is the problem with that.
If you are using netbeans, you can click on Design tab, click on the JPanel either in the frame/Design area or from the Navigator and look for Border attribute in the Pallete window. Click the ellipsis button here. You get your desired window. Hope this helps.
it was my fault
instead of I click on properties tab, I clicked on the binding tab and I looked forward it.
what the stupid man I am.

Scrollable windows

I want scrollable panes.
Please, have a look at the picture
As you can see at the Navigator, I used Tabbed Pane, then placed Scroll Panes on it. Then placed Panel on it. And then added Lables. Looks like I'm trying to reach my left ear with my right foot. But without the jPanel1 my lable occupied the whole panel size.
Well now my scrollable panel doesn't work well.
It is visible at this .
Well, I made the window narrow. But the scroll bar at the bottom doesn't allow me to reach what is behind the border further on the right. And this scrollbar seems strange. It has only t left arrow. No right one. And no vertical scroll bar if I make the window less high.
Could you give me a hint how to make scrollable windows?
I'm not sure what you're doing wrong this is the results I get when I do only this and nothing more.
Drag and drop a tabbed pane to the frame
Drag and drop a scroll pane to the tabbed pane
Drag and drop a panel to the scroll pane
Drag and drop a label to the panel, and another label to the bottom.
Resize to smaller frame and scroll bars appear
Navigator Window

Drag & Drop Netbeans buttons hidden?

After dragging and dropping a button in the design view, do I need to set the button to be visible in the source code? After testing it, the buttons do not appear.
befor using Drag and drop in netbeans you have to Drop Panel in form,then drop other component in the panel. for example , you want use commandButton. first you should Drag and drop panel in form then drop commandbutton in that panel.
very easily...

java panel layout dock

I'm having problem with the "dock" in java panel. I have UI like
the panel has a slide bar, a button and a scroll view, i.e. the while area above, with GirdBagLayout, (I also tried BorderLayout but won't work either). below it is another panel, both panel are placed in a parent panel with GridBagLayout.
When I click the "more" button, I want to extend the height of the panel to 3*original height to let the scrollview show more stuff vertically. and of course I want the slide bar and button still at the bottom of the panel. I call resize on the panel but I got this:
it shows that the scrollview is longer than before but was cut, and the bar and button remain at the same place. and my question is how I can put the slide bar and button always at the botton of the panel and show the scrollview correctly.
well, answer to my own question:
have to set up the layout again and call revalidate() and repaint().

GWT: Draggable Popup with Scrollpanel

Designed a popup which is draggable, works as designed. Now Popup panel contains the ScrollPanel it is having vertical scroll bars, but while trying to scroll with dragging is not working
The following link gives u a window box implementation which is draggable. You can add scroll panel to it. I have tried it. It works. Have a look at it.
http://svn.clazzes.org/svn/gwt/branches/gwt-extras-0.1-branch/src/main/java/org/clazzes/gwt/extras/dialog/WindowBox.java

Categories