Matthias Ronald Gerard
79 / 219 / 25
Регистрация: 11.08.2022
Сообщений: 2,281
|
|||||||||||
1 | |||||||||||
Не заполняются строки в TableView11.06.2023, 07:25. Показов 1231. Ответов 1
Метки нет Все метки)
(
Всем привет!
Пробую нарисовать в JavaFX таблицу. Сама таблица и надписи над столбцами выводятся, а вот строки пустые. Причём курсор устанавливается на пустые строки. Что не так?
0
|
11.06.2023, 07:25 | |
Ответы с готовыми решениями:
1
Первые четыре строки массива заполняются целыми случайными числами в диапазоне 0…20, а каждый элемент последней строки должен быть равен минимальному Сравнить две строки, которые в цикле заполняются числами Выделение строки tableview
|
Matthias Ronald Gerard
79 / 219 / 25
Регистрация: 11.08.2022
Сообщений: 2,281
|
||||||
11.06.2023, 10:12 [ТС] | 2 | |||||
Ошибка
Код
���. 11, 2023 8:56:28 AM javafx.scene.control.cell.PropertyValueFactory getCellDataReflectively WARNING: Can not retrieve property 'guest' in PropertyValueFactory: javafx.scene.control.cell.PropertyValueFactory@5d2b10bd with provided class type: class application.Guestbook java.lang.RuntimeException: java.lang.IllegalAccessException: module javafx.base cannot access class application.Guestbook (in module GuestbookFX) because module GuestbookFX does not open application to javafx.base at javafx.base@20.0.1/com.sun.javafx.property.PropertyReference.get(PropertyReference.java:173) at javafx.controls@20.0.1/javafx.scene.control.cell.PropertyValueFactory.getCellDataReflectively(PropertyValueFactory.java:183) at javafx.controls@20.0.1/javafx.scene.control.cell.PropertyValueFactory.call(PropertyValueFactory.java:153) at javafx.controls@20.0.1/javafx.scene.control.cell.PropertyValueFactory.call(PropertyValueFactory.java:132) at javafx.controls@20.0.1/javafx.scene.control.TableColumn.getCellObservableValue(TableColumn.java:592) at javafx.controls@20.0.1/javafx.scene.control.TableColumn.getCellObservableValue(TableColumn.java:577) at javafx.controls@20.0.1/javafx.scene.control.TableCell.updateItem(TableCell.java:681) at javafx.controls@20.0.1/javafx.scene.control.TableCell.indexChanged(TableCell.java:485) at javafx.controls@20.0.1/javafx.scene.control.IndexedCell$1.invalidated(IndexedCell.java:85) at javafx.base@20.0.1/javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:113) at javafx.base@20.0.1/javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:148) at javafx.controls@20.0.1/javafx.scene.control.IndexedCell.updateIndex(IndexedCell.java:130) at javafx.controls@20.0.1/javafx.scene.control.skin.TableRowSkinBase.updateCells(TableRowSkinBase.java:523) at javafx.controls@20.0.1/javafx.scene.control.skin.TableRowSkinBase.<init>(TableRowSkinBase.java:155) at javafx.controls@20.0.1/javafx.scene.control.skin.TableRowSkin.<init>(TableRowSkin.java:81) at javafx.controls@20.0.1/javafx.scene.control.TableRow.createDefaultSkin(TableRow.java:213) at javafx.controls@20.0.1/javafx.scene.control.Control.doProcessCSS(Control.java:910) at javafx.controls@20.0.1/javafx.scene.control.Control$1.doProcessCSS(Control.java:88) at javafx.controls@20.0.1/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:68) at javafx.graphics@20.0.1/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147) at javafx.graphics@20.0.1/javafx.scene.Parent.doProcessCSS(Parent.java:1401) at javafx.graphics@20.0.1/javafx.scene.Parent$1.doProcessCSS(Parent.java:125) at javafx.graphics@20.0.1/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98) at javafx.graphics@20.0.1/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147) at javafx.graphics@20.0.1/javafx.scene.Parent.doProcessCSS(Parent.java:1401) at javafx.graphics@20.0.1/javafx.scene.Parent$1.doProcessCSS(Parent.java:125) at javafx.graphics@20.0.1/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98) at javafx.graphics@20.0.1/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147) at javafx.graphics@20.0.1/javafx.scene.Node.processCSS(Node.java:9624) at javafx.graphics@20.0.1/javafx.scene.Node.applyCss(Node.java:9711) at javafx.controls@20.0.1/javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1813) at javafx.controls@20.0.1/javafx.scene.control.skin.VirtualFlow.getCell(VirtualFlow.java:1790) at javafx.controls@20.0.1/javafx.scene.control.skin.VirtualFlow.getOrCreateCellSize(VirtualFlow.java:3049) at javafx.controls@20.0.1/javafx.scene.control.skin.VirtualFlow.getOrCreateCellSize(VirtualFlow.java:3021) at javafx.controls@20.0.1/javafx.scene.control.skin.VirtualFlow.recalculateAndImproveEstimatedSize(VirtualFlow.java:3129) at javafx.controls@20.0.1/javafx.scene.control.skin.VirtualFlow.recalculateAndImproveEstimatedSize(VirtualFlow.java:3109) at javafx.controls@20.0.1/javafx.scene.control.skin.VirtualFlow.recalculateEstimatedSize(VirtualFlow.java:3103) at javafx.controls@20.0.1/javafx.scene.control.skin.VirtualFlow$5.invalidated(VirtualFlow.java:860) at javafx.base@20.0.1/javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:113) at javafx.base@20.0.1/javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:148) at javafx.controls@20.0.1/javafx.scene.control.skin.VirtualFlow.setCellCount(VirtualFlow.java:904) at javafx.controls@20.0.1/javafx.scene.control.skin.TableViewSkinBase.updateItemCount(TableViewSkinBase.java:580) at javafx.controls@20.0.1/javafx.scene.control.skin.TableViewSkin.<init>(TableViewSkin.java:123) at javafx.controls@20.0.1/javafx.scene.control.TableView.createDefaultSkin(TableView.java:1670) at javafx.controls@20.0.1/javafx.scene.control.Control.doProcessCSS(Control.java:910) at javafx.controls@20.0.1/javafx.scene.control.Control$1.doProcessCSS(Control.java:88) at javafx.controls@20.0.1/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:68) at javafx.graphics@20.0.1/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147) at javafx.graphics@20.0.1/javafx.scene.Parent.doProcessCSS(Parent.java:1401) at javafx.graphics@20.0.1/javafx.scene.Parent$1.doProcessCSS(Parent.java:125) at javafx.graphics@20.0.1/com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98) at javafx.graphics@20.0.1/com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:147) at javafx.graphics@20.0.1/javafx.scene.Node.processCSS(Node.java:9624) at javafx.graphics@20.0.1/javafx.scene.Scene.doCSSPass(Scene.java:587) at javafx.graphics@20.0.1/javafx.scene.Scene.preferredSize(Scene.java:1786) at javafx.graphics@20.0.1/javafx.scene.Scene$2.preferredSize(Scene.java:411) at javafx.graphics@20.0.1/com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:65) at javafx.graphics@20.0.1/javafx.stage.Window$12.invalidated(Window.java:1163) at javafx.base@20.0.1/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110) at javafx.base@20.0.1/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145) at javafx.graphics@20.0.1/javafx.stage.Window.setShowing(Window.java:1239) at javafx.graphics@20.0.1/javafx.stage.Window.show(Window.java:1254) at javafx.graphics@20.0.1/javafx.stage.Stage.show(Stage.java:277) at GuestbookFX/application.GuestbookWin.<init>(GuestbookWin.java:42) at GuestbookFX/application.Main.newWindow(Main.java:33) at GuestbookFX/application.Main.lambda$0(Main.java:20) at javafx.base@20.0.1/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at javafx.base@20.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232) at javafx.base@20.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189) at javafx.base@20.0.1/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at javafx.base@20.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at javafx.base@20.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@20.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@20.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@20.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@20.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@20.0.1/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at javafx.base@20.0.1/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) at javafx.base@20.0.1/javafx.event.Event.fireEvent(Event.java:198) at javafx.graphics@20.0.1/javafx.scene.Node.fireEvent(Node.java:8944) at javafx.controls@20.0.1/javafx.scene.control.Button.fire(Button.java:203) at javafx.controls@20.0.1/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:207) at javafx.controls@20.0.1/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274) at javafx.base@20.0.1/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247) at javafx.base@20.0.1/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) at javafx.base@20.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232) at javafx.base@20.0.1/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189) at javafx.base@20.0.1/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at javafx.base@20.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at javafx.base@20.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@20.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@20.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@20.0.1/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at javafx.base@20.0.1/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at javafx.base@20.0.1/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at javafx.base@20.0.1/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) at javafx.base@20.0.1/javafx.event.Event.fireEvent(Event.java:198) at javafx.graphics@20.0.1/javafx.scene.Scene$MouseHandler.process(Scene.java:3980) at javafx.graphics@20.0.1/javafx.scene.Scene.processMouseEvent(Scene.java:1890) at javafx.graphics@20.0.1/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2704) at javafx.graphics@20.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411) at javafx.graphics@20.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at javafx.graphics@20.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450) at javafx.graphics@20.0.1/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424) at javafx.graphics@20.0.1/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449) at javafx.graphics@20.0.1/com.sun.glass.ui.View.handleMouseEvent(View.java:551) at javafx.graphics@20.0.1/com.sun.glass.ui.View.notifyMouse(View.java:937) at javafx.graphics@20.0.1/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics@20.0.1/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:185) at java.base/java.lang.Thread.run(Thread.java:1623) Caused by: java.lang.IllegalAccessException: module javafx.base cannot access class application.Guestbook (in module GuestbookFX) because module GuestbookFX does not open application to javafx.base at javafx.base@20.0.1/com.sun.javafx.property.MethodHelper.invoke(MethodHelper.java:70) at javafx.base@20.0.1/com.sun.javafx.property.PropertyReference.get(PropertyReference.java:171) ... 110 more Решено. Добавил в определение модуля для проекта opens application to javafx.base
0
|
11.06.2023, 10:12 | |
11.06.2023, 10:12 | |
Помогаю со студенческими работами здесь
2
Detail pane для строки в TableView Получить номер выделенной строки tableView TableView , заполнение данными , пустые строки
Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |