JavaFX Drag and Drop for Internal and External Communication

  Рет қаралды 45,721

Genuine Coder

Genuine Coder

Күн бұрын

Пікірлер: 37
@aaronhernandez1447
@aaronhernandez1447 2 жыл бұрын
Excellent tutorial to implement drag and drop operation. Also, the process you followed makes it very clear the steps to follow based on dropped, on Done or Exited status. Thank you so much.
@hugginsmafigu642
@hugginsmafigu642 7 жыл бұрын
Nice stuff!! Your explanation is the best ever hey
@thesaltyguy3564
@thesaltyguy3564 4 жыл бұрын
Awesome video, you answer all of my questions ! Thank you
@hasaanahmed8505
@hasaanahmed8505 6 жыл бұрын
very nice you really are a genuine coder thanks for all the nice stuff
@JustLookinkAround
@JustLookinkAround 5 жыл бұрын
Thank You so much for this! Very good explanation!
@eltonfonseca900
@eltonfonseca900 8 жыл бұрын
Very good, that's what I needed. Thanks very much!
@GenuineCoder
@GenuineCoder 8 жыл бұрын
Thanks :-)
@verrymariyanto8377
@verrymariyanto8377 6 жыл бұрын
what are you doing exactly in minutes 01:06 to show the fxml edior? thx
@GenuineCoder
@GenuineCoder 6 жыл бұрын
Hi, Once Scene Builder is installed in your system, when you do double click on FXML files, it will open automatically (in NetBeans). Read this article on using NetBeans and Scene Builder together: docs.oracle.com/javase/8/scene-builder-2/work-with-java-ides/sb-with-nb.htm Get latest scene builder from: gluonhq.com/products/scene-builder/#download
@verrymariyanto8377
@verrymariyanto8377 6 жыл бұрын
Genuine Coder yes.thx
@adrianocorreiacesar4979
@adrianocorreiacesar4979 5 жыл бұрын
How do you handle when you want to drag and object? I am trying to drag a circle object, but I don't see any option to accept that format.
@ethanfranklin7651
@ethanfranklin7651 5 жыл бұрын
The methods becomes easier when you explain it Buddy!!!! Can please tell me how to drag and drop multiple images into a pane or a HBox is it possible?????
@igon388
@igon388 5 жыл бұрын
Should be straight forward, you will get a list of the files then just add each of those files to the HBox as images. But I haven't done this so good luck
@d6853
@d6853 4 жыл бұрын
Hi, I’m making a poker game and I want to move casino chips into a part of the table. I want to drag and drop the casino chips but how do I make it so that the game counts the value of chips you bet?
@sihleeundefined1208
@sihleeundefined1208 3 жыл бұрын
How do I move a HBox within Anchorpane?
@eslamashour3245
@eslamashour3245 5 жыл бұрын
I did the same like you but the drag events did not fire when i try to drag an image to my JavaFX App can you help ?
@learning-from-bs
@learning-from-bs 5 жыл бұрын
when i click and drag an image from the source, the size of the image (while dragging) expands/enlarges up until i drop the image on the target! how can i reduce the side of the image while dragging it?
@ethanfranklin7651
@ethanfranklin7651 5 жыл бұрын
Same Problem Buddy!!!!
@learning-from-bs
@learning-from-bs 5 жыл бұрын
@@ethanfranklin7651 i figured it! you need to used dashboard.setImage(); there you coud choose any image you want and also set the height and width! let me know you got it...
@ethanfranklin7651
@ethanfranklin7651 5 жыл бұрын
@@learning-from-bs can you send me the source code please, i really need it
@learning-from-bs
@learning-from-bs 5 жыл бұрын
@@ethanfranklin7651 import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.*; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.List; public class ControllerTwo { public ImageView targetImageView; public ImageView sourceImageView; // Image img = new Image("sample/wifi.png"); public void handleOnDragDetected(MouseEvent event) { Dragboard dragboard = sourceImageView.startDragAndDrop(TransferMode.ANY); dragboard.setDragView(new Image("sample/wifi.png", 50, 50, true, false)); ClipboardContent clipboardContent = new ClipboardContent(); clipboardContent.putImage(sourceImageView.getImage()); dragboard.setContent(clipboardContent); event.consume(); } public void handleDragOver(DragEvent event) { if ( event.getDragboard().hasImage() ) event.acceptTransferModes(TransferMode.ANY); event.consume(); } public void handleOnDragDropped(DragEvent event) throws FileNotFoundException { Dragboard db = event.getDragboard(); Image img = db.getImage(); // targetImageView = sourceImageView; targetImageView.setImage(img); event.consume(); } }
@learning-from-bs
@learning-from-bs 5 жыл бұрын
@@ethanfranklin7651 so this you can play around to change the img that's loaded on the dragboard... i used scene builder. i also followed this tutorial when i was writing this code but somehow the image was 5 times bigger while being dragged in transition lool
@HaaveileeJi
@HaaveileeJi 4 жыл бұрын
Great explanation!!!
@shashwatkhanna6036
@shashwatkhanna6036 8 жыл бұрын
Thanks so much for this. Do you recommend any book for javafx ?
@GenuineCoder
@GenuineCoder 8 жыл бұрын
Hi, I recommend visiting github.com/mhrimaz/AwesomeJavaFX This repo contains a lot useful materials related to JavaFX (including books and tutorials).
@leonardouberti
@leonardouberti 8 жыл бұрын
Very good, thanks!
@jhosefcaceres7005
@jhosefcaceres7005 8 жыл бұрын
Thanks, very good video.
@brianLongNeck1073
@brianLongNeck1073 4 жыл бұрын
amazing video thank you so much
@kuzan5214
@kuzan5214 7 жыл бұрын
Nice video, but i have to drag a excel file into my application how can i do that can you help me?
@GenuineCoder
@GenuineCoder 7 жыл бұрын
+KUZAN You can drag and drop any file like this. After receiving the file, you will have to process it accordingly
@ethanfranklin7651
@ethanfranklin7651 5 жыл бұрын
How to Drag and Drop a image from one pane to another
@cuthbertjohnkarawa3862
@cuthbertjohnkarawa3862 8 жыл бұрын
please can you make tutorial on splash screen
@GenuineCoder
@GenuineCoder 8 жыл бұрын
I already have. 1. JavaFX Splash Screen / Welcome Screen (Inside Same Window) : kzbin.info/www/bejne/o6bdZ4SCfsyleZI 2. JavaFX Splash Screen 2 : Loading In a Seperate : Window kzbin.info/www/bejne/nGGZpoiqoNKneqc
@cuthbertjohnkarawa3862
@cuthbertjohnkarawa3862 8 жыл бұрын
Okay thnx....
@itsgroups
@itsgroups 6 жыл бұрын
Thank you :)
JavaFX TreeTableView Tutorial #3 : Editing Cells
9:41
Genuine Coder
Рет қаралды 31 М.
JavaFX stages 🎭
13:49
Bro Code
Рет қаралды 134 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
JavaFX Explore: Make Any Node Draggable
11:48
Almas Baim (AlmasB)
Рет қаралды 8 М.
JavaFX #1 - introduction
17:52
FormationVidéo
Рет қаралды 19 М.
JavaFX switch scenes 💞
8:35
Bro Code
Рет қаралды 178 М.
JavaFX 20 and Beyond
41:37
Java
Рет қаралды 21 М.
JavaFX CSS styling 🎨
10:28
Bro Code
Рет қаралды 95 М.
I Redesigned the ENTIRE YouTube UI from Scratch
19:10
Juxtopposed
Рет қаралды 1 МЛН
JavaFX Scene Builder Tutorial for Beginners
18:25
Genuine Coder
Рет қаралды 339 М.
Snap to Grid Demo in JavaFX: 2 - Movement and Snapping
10:20
Mark Goadrich
Рет қаралды 6 М.