Commit 1b034e7d authored by edmundszagars's avatar edmundszagars
Browse files

Changed size for FileLocation text field

parent 791a92ea
......@@ -7,8 +7,6 @@ import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.CheckBox;
import javafx.scene.control.TextField;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.VBox;
import javafx.stage.FileChooser;
import javafx.stage.Stage;
......@@ -30,6 +28,7 @@ public class MainWindow extends Application {
Label label = new Label("Select file location: ");
TextField fileLocation = new TextField();
fileLocation.setMaxWidth(250);
Button selectFileButton = new Button("Select file");
selectFileButton.setOnAction(event -> {
......@@ -71,12 +70,12 @@ public class MainWindow extends Application {
e.printStackTrace();
}
if(bubbleSortCheckBox.isSelected()){
double[] ar = dataFromCSV.getDoubleArrayFromListItem((ArrayList<Double>) list.get(0));
double[] ar = dataFromCSV.getDoubleArrayFromListItem((ArrayList) list.get(0));
System.out.println(Arrays.toString(BubbleSort.bubbleSort(ar)));
System.out.println("Bouble sort will be executed");
}
double[] ar = dataFromCSV.getDoubleArrayFromListItem((ArrayList<Double>) list.get(0));
double[] ar = dataFromCSV.getDoubleArrayFromListItem((ArrayList) list.get(0));
System.out.println(Arrays.toString(ar));
});
......
......@@ -34,10 +34,10 @@ public class GetDataFromCSV {
public String getnFileLocation() {
return nFileLocation;
}
public double[] getDoubleArrayFromListItem(ArrayList<Double> list){
public double[] getDoubleArrayFromListItem(ArrayList list){
double[] array = new double[list.size()];
for (int i = 0; i < list.size();i++){
array[i] = list.get(i);
array[i] = (double) list.get(i);
}
return array;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment