bufferedREADer を使用してファイルを読み込んでいます。ファイルはテキストの多いテキスト ファイルです。
これが私がそれを読んでいる方法です
while(true) //I know the loop is not perfect just ignore it for now, i wanna concentrate on the tracking
{
try
{
br.readLine();
}
catch(IOException e)
{
break;
}
catch (Exception e)
{
break;
}
}
次のように、進行状況バーでそのパーセンテージ値を使用できるように、ファイルの何パーセントを読み取ったかを追跡したいと思います。
while(true)
{
try
{
br.readLine();
progressBar.setValue(percentageRead);//how do I get percentageRead value dynamically?
}
catch(IOException e)
{
break;
}
catch (Exception e)
{
break;
}
}