• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Jeffrey Gutierrez
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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

 
Knute Snortum
Sheriff
Posts: 4287
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could start here.
 
Campbell Ritchie
Marshal
Posts: 56581
172
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Piet Souris
Master Rancher
Posts: 2044
75
  • Mark post as helpful
  • send pies
  • 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: 56581
172
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!