• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Integration of javafx form to swing JOptionPane

Ranch Hand
Posts: 72
MySQL Database AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
    Bookmark Topic Watch Topic
  • New Topic