0
Good afternoon guys, I have a scientific initiation project in college where we work with java, in this project I created a program that performs some calculations, it displays the calculated results line by line until plotting a graph with the calculated values at the end of the process, I would now like to plot a progress bar that shows me the percentage of the calculations have been done, I searched how to plot this bar but it never works, I hope some of you can help me in this problem, thank you!
String energy = Energia.getText();
String Particula= (String) comboBox.getSelectedItem();
try {
ProcessBuilder builder = new ProcessBuilder("C:\\Users\\Juliana Cabral\\eclipse-workspace\\Gmf1\\src\\Gmf-igor.exe", energy, Particula);
Process process = builder.start();
InputStream inputStream = process.getInputStream();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream), 1);
String line;
while ((line = bufferedReader.readLine()) != null) {
System.out.println(line);
}
inputStream.close();
bufferedReader.close();
} catch (Exception ioe) {
//ioe.printStackTrace();
}