1 Replies - 2966 Views - Last Post: 11 December 2008 - 08:57 PM Rate Topic: -----

#1 windra  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 27-November 08

Recording the progress of JEditorPane.setPage in a JProgressBar

Post icon  Posted 11 December 2008 - 10:12 AM

Ive been reading up on JProgressBar for my java webbrowser. I use the JeditorPane to display webpages and i want to link the JEditorPane.setPage() 's progress to a JprogressBar.

When i look at tutorials they are simulating a tasks progress by using a timer, which doesnt help at all when it comes to real tasks.

What i cant figure out is how to track the progress of a method that is part of a component and not one that i have created myself.

Can anyone help?

Is This A Good Question/Topic? 0
  • +

Replies To: Recording the progress of JEditorPane.setPage in a JProgressBar

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8327
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Recording the progress of JEditorPane.setPage in a JProgressBar

Posted 11 December 2008 - 08:57 PM

Does not seem evident at all
Don't see how it can be done with the JEditorPane
The only thing you can do is to download the page with a BufferedReader it will tell you know how many bytes you still have to read and update your ProgressBar accordingly and you can JEditorPane.setText() with the stuff you have already read every 1000 bytes or something like that
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1