kleine änderung an der image url
This commit is contained in:
parent
8a03439ab6
commit
4ccb2c80f2
@ -127,11 +127,13 @@ public class HelloController {
|
||||
|
||||
|
||||
@FXML
|
||||
private String veggieImageUrl = "vegetarisch.png";
|
||||
final String imagePathUrl = "file:target/classes/com/example/vpr_javafx/pics/";
|
||||
@FXML
|
||||
private String veganUrl = "vegan.png";
|
||||
final String veggieImageUrl = imagePathUrl + "vegetarisch.png";
|
||||
@FXML
|
||||
private String meatUrl = "fleisch.png";
|
||||
final String veganImageUrl = imagePathUrl + "vegan.png";
|
||||
@FXML
|
||||
final String meatImageUrl = imagePathUrl + "fleisch.png";
|
||||
@FXML
|
||||
private String imageUrl;
|
||||
|
||||
@ -163,16 +165,16 @@ public class HelloController {
|
||||
String dayMenu = dish+"\n"+sideDish+"\n"+"("+allergenic+")";
|
||||
|
||||
if(typ.equals("Fleisch")) {
|
||||
imageUrl=meatUrl;
|
||||
imageUrl=meatImageUrl;
|
||||
}
|
||||
if(typ.equals("Vegetarisch")) {
|
||||
imageUrl=veggieImageUrl;
|
||||
}
|
||||
if(typ.equals("Vegan")) {
|
||||
imageUrl=veganUrl;
|
||||
imageUrl=veganImageUrl;
|
||||
}
|
||||
|
||||
Image image = new Image("file:target/classes/com/example/vpr_javafx/pics/" + imageUrl);
|
||||
Image image = new Image(imageUrl);
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user