|
|
|
JavaFX 2 initialize Image ImageView
|
|||
|---|---|---|---|
|
#18+
Код: java 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.06.2015, 14:19 |
|
||
|
JavaFX 2 initialize Image ImageView
|
|||
|---|---|---|---|
|
#18+
Прочтите же, наконец, инструкцию https://docs.oracle.com/javase/8/javafx/api/javafx/scene/image/Image.html#Image-java.lang.String- public Image(String url ) Constructs an Image with content loaded from the specified url . Parameters: url - the string representing the URL to use in fetching the pixel data Throws: NullPointerException - if URL is null IllegalArgumentException - if URL is invalid or unsupported file:/D:/temp/pics3.png ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.06.2015, 14:26 |
|
||
|
JavaFX 2 initialize Image ImageView
|
|||
|---|---|---|---|
|
#18+
Blazkowicz, Спасибо. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.06.2015, 14:31 |
|
||
|
JavaFX 2 initialize Image ImageView
|
|||
|---|---|---|---|
|
#18+
Еще один вопрос. Хочу, чтоб это изображение отобразилось в окне. Что делаю: 1) Создал окно(форму) с помощью SceneBuilder. 2) Указал Controller class. 3) Добавил ImageView на форму. 4) Указал fx:id -> iv1. Использую код (см. первый пост) И ожидаю, что изображение появится при запуске окна(формы) - но ничего не отображается. Что я мог забыть? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 22.06.2015, 15:18 |
|
||
|
|

start [/forum/topic.php?fid=59&fpage=126&tid=2125257]: |
0ms |
get settings: |
8ms |
get forum list: |
11ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
136ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
33ms |
get tp. blocked users: |
1ms |
| others: | 256ms |
| total: | 461ms |

| 0 / 0 |
