Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Integration of javafx form to swing JOptionPane

 
shashank dwivedi
Ranch Hand
Posts: 65
AngularJS Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying a add a registration form(written in javafx) to my swing application.
I wanted to display this form as a popup , once register button is clicked.
I have written demo class below so far.The problem is JOptionPane is not able to display whole form.I am new to both swing and javafx.
Any help much appreciated.

Thanks.

 
John Damien Smith
Ranch Hand
Posts: 298
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't advise mixing JavaFX and Swing unless you are embedding in a large existing framework like NetBeans RCP - even then, evaluate your options.
If you are new to both Swing and JavaFX, I especially don't recommend mixing the two toolkits - even more so if you are a bit uncomfortable with concurrency related tasks. If you don't have much experience in either Swing or JavaFX, I recommend learning and using only JavaFX for new developments.

Java 8u40 includes a JavaFX Alert class which can do pretty much everything you could do with a JOptionPane and is probably more flexible than a JOptionPane, plus it integrates better with JavaFX, so I advise you to use that rather than a JOptionPane - see a quick tutorial on JavaFX dialogs.

Thanks for supplying a test case, I haven't had a chance to look at it in detail - if I do, I'll provide more specific feedback.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic