Re: A frame with JBuilder???
Jewel, I would strongly suggest NetBeans.
Of course, you need to know basic Java programming before you start, but NetBeans allows you to interactively (drag & drop) create an interface, and lets you insert calculations easily.
(example)
1. You create two text boxes (op_one and op_two), a button (calc) and a label (result).
2. You right click on the button, and add an event (MouseClicked).
3. NetBeans will create all the necessary object declarations and listeners as well as the "onClick" function, that will be - as expected - executed once the mouse is clicked (on the button).
4. Then, all you gotta do is write something like:
Code:
result.setText(op_one.getText() + op_two.getText());
5. Once you compile, the two numbers you type into the two text boxes will be added together and displayed on the label once you click on the button.
Simple as that
N.B. I've intentionally omitted type conversion to avoid complicating the example. The above code might not work 100% correctly (or at all). Type conversion can be done like this:
Code:
String s = "22";
int i;
double d;
i = Integer.parseInt(s);
d = Double.parseDouble(s);