This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how my scrollbar works?

 
vishnu vardhan brundavanam
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi....
i wrote code to draw a graph(line) by tacking data from a file ....the code for that is here...




Now the problem is the scrollbar is not working to see complete graph when i'm giving many input values.......
The here is the calling class(main) of the above code.....


the i don't how to implement this listener .....
----------------------------------------------------



i'm attaching output screen also...actually there i haven taken around 90+ input values...

please help me .....
thank u....



output.jpg
output of the above program...
[Thumbnail for output.jpg]
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scrollbars work when the size of their child components exceed the available display say.
Try overriding getPreferredSize() in your panels (the one which paints the graphs)
 
vishnu vardhan brundavanam
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you show the code how to implement that getPreferredSize() in my application...?
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
vishnu vardhan brundavanam
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you please complete this program..?
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the API for JScrollPane and follow the link to the Java tutorial on How to Use Scroll Panes, where you will find example code.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic