jide agboola

Greenhorn
+ Follow
since Nov 11, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jide agboola

Thanks a lot, i got it working, i only set the CLASSPATH initially and not the PATH, now it all done.once again thanks..
17 years ago
Hi
Im studying java and i had it installed on my machine. It had xp and i knew how to set the class path on that. But now i upgraded to vista and when i set the classpath its not working....i mean i cant run any java from the command line...how do i set the class path properly? what should i enter in the environment variable? can anyone tell me exactly what to enter and where to enter? I had just done it the way i did for my old XP, but not working still...
17 years ago
This is the code i have just wrote for currency conversion from Dollar to Naira, did not show anything despite the setVisile method.
17 years ago
I have just written this code for calculating the perimeter and area of Rectangle, i was able to compile it but still couldn't run it, could anyone please help me have a look at it.
17 years ago
I tried to build a simple calculator with three textFields, for data X and Y to yield result Z on the third TextField, with five Buttons for each arithmetic operator and clear button.

This is my code


i have only added Listerner to the add button.
i dont know i still keep getting errors.
Thanks
17 years ago
Dear Ranchers,
I would like anybody to please post me a source code where Simple eventListner is being implemented, prefarable something that has to do with buttons, sending texts to Textfileds as in simple calculator....

i have some codes that i am trying to study, but still kinda complex for me to comprehend..

Maybe a simple code to show like addition of two numbers and display the result, i will build on that to move on in my career.

Thanks.
17 years ago
Can i get some understanding why you inherit from JPanel, and not JFrame?(anybody help please)
17 years ago
this is the Calculator code that i developed, the GUI was not perfectly arranged as i wanted but still contains all neccessary components that i needed. My main problem now is to get those buttons working and i will later learn more about my Layout manager.



import java.awt.*;
import javax.swing.*;

class jideCalculator extends JFrame {
//setting row1
JPanel row1 = new JPanel();
JTextField screen = new JTextField(15);
//setting row2
JPanel row2 = new JPanel();
JButton button7 = new JButton("7");
JButton button8 = new JButton("8");
JButton button9 = new JButton("9");
JButton buttonDel = new JButton("DEL");
JButton buttonAc = new JButton("AC");
//setting row3
JPanel row3 = new JPanel();
JButton button4 = new JButton("4");
JButton button5 = new JButton("5");
JButton button6 = new JButton("6");
JButton buttonX = new JButton("X");
JButton buttonDivision = new JButton("/");
//seting row4
JPanel row4 = new JPanel();
JButton button1 = new JButton("1");
JButton button2 = new JButton("2");
JButton button3 = new JButton("3");
JButton buttonPlus = new JButton("+");
JButton buttonMinus = new JButton("-");
//setting row5
JPanel row5 = new JPanel();
JButton buttonZero = new JButton("0");
JButton buttonPeriod = new JButton(".");
JButton buttonComma = new JButton(",");
JButton buttonResult = new JButton("=");
//setting the Frame
public jideCalculator() {
super("Jide's Calculator");
setSize(400,400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GridLayout layout = new GridLayout(5, 1, 10, 10);
Container pane = getContentPane();
pane.setLayout(layout);

//setting row1 layout
FlowLayout layout1 = new FlowLayout(FlowLayout.CENTER, 10, 10);
row1.setLayout(layout1);
row1.add(screen);
screen.setEditable(false);
pane.add(row1);
//setting row2 layout
FlowLayout layout2 = new FlowLayout();
row2.setLayout(layout2);
row2.add(button7);
row2.add(button8);
row2.add(button9);
row2.add(buttonDel);
row2.add(buttonAc);
pane.add(row2);
//setting row3 layout
FlowLayout layout3 = new FlowLayout();
row3.setLayout(layout3);
row3.add(button4);
row3.add(button5);
row3.add(button6);
row3.add(buttonX);
row3.add(buttonDivision);
pane.add(row3);
//setting row4 layout
FlowLayout layout4 = new FlowLayout();
row4.setLayout(layout4);
row4.add(button1);
row4.add(button2);
row4.add(button3);
row4.add(buttonPlus);
row4.add(buttonMinus);
pane.add(row4);
//setting row5 layout
FlowLayout layout5 = new FlowLayout();
row5.setLayout(layout5);
row5.add(buttonZero);
row5.add(buttonPeriod);
row5.add(buttonComma);
row5.add(buttonResult);
pane.add(row5);
setVisible(true);
}
//execution statement
public static void main(String[] arguments) {
jideCalculator jide = new jideCalculator();
}
}
17 years ago
i am trying to develop a calculator, i have able to develop the GUI from the frame class but still have problem in writing codes for the keys i.e event hanlers...

could anyone be of help to make me develop my first real application.
Thanks
[ November 13, 2006: Message edited by: jide agboola ]
17 years ago