• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Picture frame calculator

 
Ray Smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • 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
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • 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
  • 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
Description:
File size: 443 Kbytes
[Download sample calculator excel pic.bmp] Download Attachment
Filename: sample calculator excel pic2.bmp
Description:
File size: 404 Kbytes
[Download sample calculator excel pic2.bmp] Download Attachment
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic