• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Programmed a working BMI calculator, how to make it a GUI for it?

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm back with a pretty big request, I basically want to implement this code into a gui, I imagine I'd use java fx, anyone got any good starting points or good links to where I can do it, or if it's even possible? I'm basically asking for a starting point. a list of stubs, because I'm trying to use javafx but I'm just not getting how to implement my code into it

 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could start here.
 
Marshal
Posts: 79406
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Agree with Knute that learning JavaFX is worthwhile. Swing is gradually being replaced by JavaFX.
You should also have an interface to that BMI calculator. For which you need an object. It should have a constructor and weight and height fields and getWeight getHeight and getBMI (at least) methods. Start by creating that class, then we can move you to a GUIs forum later.
 
Jeffrey Gutierrez
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Agree with Knute that learning JavaFX is worthwhile. Swing is gradually being replaced by JavaFX.
You should also have an interface to that BMI calculator. For which you need an object. It should have a constructor and weight and height fields and getWeight getHeight and getBMI (at least) methods. Start by creating that class, then we can move you to a GUIs forum later.

Myabe I should wait then, because the fallowing chapter is gonna teach me about construcutors, objects and arrays and interfaces is even further down the road, javafx is like one of the last chapters of the book... but hey... I'm dedicated to become good at this because once I'm good at this and I got you guys and I got control over my day I'ma start doing things that are important, like writing programs that help people and help people on this forum, who knows I might even solve NP vs P problem some day.
 
Bartender
Posts: 5470
212
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeffrey Gutierrez wrote:

Campbell Ritchie wrote:(...) For which you need an object. It should have a constructor and weight and height fields and getWeight getHeight and getBMI (at least) methods. Start by creating that class, then we can move you to a GUIs forum later.

(...) who knows I might even solve NP vs P problem some day.


Well, you could start with writing an interface for that, and then we'll transfer it to the GUI forum too!

Greetz,
Piet
 
Campbell Ritchie
Marshal
Posts: 79406
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeffrey Gutierrez wrote: . . . I might even solve NP vs P problem some day.

Nothing like starting with an easy task
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic