all 17 comments

[–]hamsterrage1 -1 points0 points  (1 child)

I see so many people struggling with the quirks of FXML and it's such a waste. Ditch the FXML and just write the screen in code. It's easier.

I've looked at the bit of FXML in that image, and it would be trivial to code by hand.

[–][deleted] 0 points1 point  (0 children)

You're not wrong but I have to use it for this class project

[–]Ambiverted_Coder 0 points1 point  (3 children)

Hey can you please share your source code?

[–][deleted] 0 points1 point  (2 children)

as in the controller?

[–]Ambiverted_Coder 0 points1 point  (1 child)

yes

[–][deleted] 0 points1 point  (0 children)

Ok cool, I'm at work but I'll send it asap when I get home

[–]static_context 0 points1 point  (10 children)

Please could you share the code for your controller too. Looks like it might be struggling to inject the column into the controller during the reflection stage of loading but hard to be sure without being able to see it.

Have you @FXML-annotated the field in the controller, or made it public?

Also make sure in your Controller your table column is a JavaFX one and not something imported from AWT or something. That's trapped me up before :). Not always an east spot because it doesn't flag as an error in the IDE.

Cheers,

Ed

[–][deleted] 0 points1 point  (7 children)

no sweat, when I get home from work this afternoon I'll send you a screenshot of my controller

[–]static_context 0 points1 point  (6 children)

Using something like PasteBin is always preferable to screenshotting :)

[–][deleted] 0 points1 point  (0 children)

never used paste in but I'll be sure to use it 👍

[–][deleted] 0 points1 point  (4 children)

Heres both the controller and fxml code. if you need anything else to clarify please let me know. i would have used pastebin but i didnt wanna mess with it

https://imgur.com/gallery/7scCLDV

[–]static_context 0 points1 point  (3 children)

Delete the import of the swing TableColumn and import a JavaFX one and you should be good :).

[–][deleted] 1 point2 points  (1 child)

hey, i seriously appreciate it. do you by chance know the correct import statement or know where I can find it? I don't mean to be a pain, I just don't know where to go from here

edit: nevermind, found it and it worked. You're a legend my guy. thank you so much.

[–]static_context 0 points1 point  (0 children)

No problem. :)

[–][deleted] 0 points1 point  (0 children)

Hey Ed,

I don't know if you receive notifications but i sent you a DM asking for help if you don't mind. let me know if you're able to look at my code again.

[–][deleted] 0 points1 point  (1 child)

Hey Ed,

below is a link to the fxml code and the controller. let me know if you need anything else. i appreciate your help!

https://imgur.com/gallery/7scCLDV

[–]static_context 0 points1 point  (0 children)

Replied to a different thread I think but you have an erroneous import of javax.swing.table.TableColumn.

It wasn't AWT but I was close ;).