₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,331,283 members, 8,449,567 topics. Date: Wednesday, 22 July 2026 at 02:41 AM

Toggle theme

Mmsh350's Posts

Nairaland ForumMmsh350's ProfileMmsh350's Posts

1 (of 1 pages)

ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(op): 6:18pm On Nov 06, 2012
Thanks mkwayisi
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(op): 6:07pm On Oct 17, 2012
thank you my dear mashnino but i want u to know that i know what am doing,and i also want u to know that the word GUI stand for Graphical user interface so as you can see JOptionpane is a way of display message Graphically.
And the reason why am in this forum is because i want to learn more on what are know and to also help my friends with what they don't know.
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(op): 5:52pm On Oct 03, 2012
dis is my email:sani.muhammad37@yahoo.com
ProgrammingHelloworld Java Application For Beginers by mmsh350(op): 11:58am On Sep 27, 2012
1 /*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5 package helloworld.java;
6
7 /**
8 *
9 * @author MUHAMMAD
10 */
11 public class HelloworldJava {
12
13 /**
14 * @param args the command line arguments
15 */
16 public static void main(String[] args) {
17 System.out.println("welcome muhammad sani"wink;
18 }
19 }
20
21 [color=#770077][/color]
ProgrammingContinuation Of The GUI Jframe Java Program by mmsh350(op): 4:25pm On Sep 26, 2012
import javax.swing.JFrame;
public class GUI1Test {
public static void main(String arg[]){
GUI1 g=new GUI1();
g.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
g.setSize(200, 300);
g.setVisible(true);
}//end of main method

}//end of class GUI1Test
ProgrammingHow To Create A Small Gui(graphical User Interface) Using Jframe In Java Program by mmsh350(op): 4:07pm On Sep 26, 2012
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.event.ActionListener;
import java.awt.Event;
import java.awt.event.ActionEvent;
import java.awt.Font;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JOptionPane;


public class GUI1 extends JFrame{
private JTextField F;
private JLabel Text;
private JTextField Field;

public GUI1(){
super("This is the Title"wink;

setLayout(new FlowLayout());

Text=new JLabel("Hi Welcome to my windows"wink;
add(Text);
Field=new JTextField(5);
add(Field);

Handler h=new Handler();
Field.addActionListener(h);
}//end of constructor
private class Handler implements ActionListener{

public void actionPerformed(ActionEvent event){

String S="";

if(event.getSource()==Field){

S=String.format("Hi How Are You %s",event.getActionCommand());


}//end of if statements
F=new JTextField(S);
F.setForeground(Color.red);

add(F);

}//end of method actionPerformed


}//end of class Handler

}//end of class GUI1
[color=#006600][/color]
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(op): 3:54pm On Sep 26, 2012
ok am waiting!!!
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(op):
I can teach you the best i know,
ProgrammingRe: Letter From The Moderator - Please Read by mmsh350(m): 1:16pm On Sep 11, 2012
Thank u cheesy
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(op): 2:29pm On Sep 09, 2012
mmsh350: import javax.swing.JOptionPane;

public class Calculator{

public static void main(String args[]){
int sum=0;
String ans=" ";
int number=0;

ans=JOptionPane.showInputDialog(null,"Enter a number pls:"wink;
number=Integer.parseInt(ans);
for(int i=1; i < number;i++ )

sum+=i;

JOptionPane.showMessageDialog(null,"The total sum of the numbers is ="+sum);
}
}
ProgrammingHow To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(op): 11:22am On Sep 09, 2012
import javax.swing.JOptionPane;

public class Calculator{

public static void main(String args[]){
int sum=0;
String ans=" ";
int number=0;

ans=JoptionPane.showInputDialog(null,"Enter a number pls:"wink;
number=Integer.parseInt(ans);
For (int i=1; i < number;i++ )

sum+=i;

JoptionPane.showMessageDialog(null,"The total sum of the numbers is ="+sum);
}
}

1 (of 1 pages)