I am having trouble with scrollbars in netbeans 5.5.1
I have had trouble getting a scrollbar working in netbeans 5.5.1 because the code is not all self written the new 5.5.1 platform takes away the need to write as much code. As a result the books that I am using as a reference does not work.
Can anybody provide me with a an example of scrollbar script that will work in netbeans 5.5.1. I have put a scrolbar onto my GUI and right mouse clicked and then I have selected Event then Adjustment and then AdjustmentValueChanged. The script was then displayed and stated this,
"private void jScrollBar1AdjustmentValueChanged(java.awt.event.AdjustmentEvent evt) {
// TODO add your handling code here:"
I know that I have to delete // TODO add your handling code here. But what handling code should I put. If anybody could provide me with some script examples it would help. I have asked some other programmers but they wrote all of their code and were not familiar with the netbeans code requiresments.
[975 byte] By [
morganista] at [2007-11-27 11:18:48]

# 1
one other thing,... it is usually frowned upon to repost the same type post in multiple locations of this forum. But, true, in your situation Swing is a better forum for your question. So if you do this in the future, I recommend that you put in both threads references to each other so folks that help you don't waste their time explaining things that have already been explained in the other thread.
# 2
> I know that I have to delete // TODO add your handling code here. But what handling code should I put.
depends entirely on what you are 'listening' for:
the position of the scrollbar changing
the current value of the scrollbar Vs maximum
etc
etc
i.e. 'what' do you want to handle
# 4
Hi sorry I didn't realise that I shouldn't post the same question on two different forums I have never done this before (for reference I have made another post of the same question in the new to java forum).
Anyway I have figured it out so I don't need any more assistance however I am very greatful to everybody who has helped me espcially petes1234 and helloworld who made a lot of helpful comments, who I would like to thank a lot.
P.S. if either petes1234 or hellowolrd see this can they pass on my thanks to the other I will try to do it may self by posting a thank you post on the new to java forum.