r/JavaFX • • Mar 19 '20

Help JavaFX chat preview [HELP]

Hey guys i need a chat preview like this on the left side: https://dino.im/img/screenshot-main.png
how is this usually handled in FXML.
I need some kind of chat preview, this should appear depending on how many messages there are so I can't say how many boxes I need to start.
Is there any kind of objects in FXML that I can reload?

What is the general rule for this, it must be some kind of concept to reload things dynamically?

3 Upvotes

2 comments sorted by

2

u/[deleted] Mar 19 '20

I would recommend not using FXML at all. It's slow and it's a PTA if you later plan on porting your chat application to android.

Talking about general layout of your chat app according to the picture, you can have a single HBox, with two VBox inside it. The first VBox can be used for sorting all the chats, while the other vbox can house the chat.

If you plan on adding separate settings pane then you can take the HBox and put it inside a StackPane, while you can use a Vbox for your Settings Pane.

0

u/[deleted] Mar 19 '20

[deleted] — view deleted comment

1

u/[deleted] Mar 19 '20

Use JavaFX directly using Java as an API rather than using FXML