• 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

Picture frame calculator

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone, newbie first post here

I've got a calculator that i created in excel that I wanted to learn to code it in Java, been reading and following a few tutorials on YouTube and really enjoying it

I tried to upload the .xlsx calculator for show how it works but it does let me, maybe some one can give a push start or some pointers, calculator it uses a table for reference to pick the finished width of the frame for the picture/photo

Thank you.
 
Ray Smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I realized I have a long way to go so I signed up for classes, my question was what would it take to make an app like this work because it uses a chart with four columns and one hundred rows to find the proper width of a frame



Ray.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
many things that emulate excel are done in a JTable - but it's just a grid, nothing fancy.

Swing is not easy, so bookmark this page

http://docs.oracle.com/javase/tutorial/uiswing/TOC.html
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Java equivalent of a lookup table is a java.util.Map.

... it uses a chart with four columns and one hundred rows


What are the column contents? Presumably one is the value looked up, and the other three are returned by spreadsheet functions. In Java, you would create a class encapsulating those three values, and a Map that cross references the lookup value (as "Key") to instances of this class (as "Value").

I strongly recommend that you first try to write this as a command line application; put off even trying to create a GUI till after you have that working correctly.
 
Ray Smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the responses, will look into your suggestions

I uploaded a couple pictures of the calculator and the reference table to give you guys a better Idea, basically a picture 36'' wide will be assigned a predetermined frame size of 46.5" or 37, 38, 39, 40 and 41 will also be assigned a frame width of 46.5'' if I enter 42 thru 47 in the picture width box it will give the next predetermined frame width size of 53" for that range

to get the finished frame size it looks thru first column to find the answer in the second column, the idea is setting this up in the Java desktop application itself, I found Apache POI, functions but I don't want to be depending on excel for my reference table if possible


Ray
Filename: sample-calculator-excel-pic.bmp
File size: 454 Kbytes
Filename: sample-calculator-excel-pic2.bmp
File size: 413 Kbytes
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic