Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying File contents in awt window  RSS feed

 
Chandhrasekar Saravanan
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am planning to display the contents of file in awt window
using Graphics drawString() method. sometimes i cannot display
large files because there are no scrollbars.

I like to know how we could provide scrollbars dynamically
in the window.i.e if the file is larger then the window screen
it should have a scrollbar else no.
Thanks
Regards
Chandhrasekar Saravanan
 
Rene Liebmann
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to do this, you need ScrollBars. AWT has also a ScrollPane (java.awt.ScrollPane). Try to have a look there.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!