Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,702 members, 7,813,320 topics. Date: Tuesday, 30 April 2024 at 10:45 AM

Mmsh350's Posts

Nairaland Forum / Mmsh350's Profile / Mmsh350's Posts

(1) (of 1 pages)

Programming / Re: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(m): 6:18pm On Nov 06, 2012
Thanks mkwayisi
Programming / Re: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(m): 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.
Programming / Re: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(m): 5:52pm On Oct 03, 2012
dis is my email:sani.muhammad37@yahoo.com
Programming / Helloworld Java Application For Beginers by mmsh350(m): 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]
Programming / Continuation Of The GUI Jframe Java Program by mmsh350(m): 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
Programming / How To Create A Small Gui(graphical User Interface) Using Jframe In Java Program by mmsh350(m): 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]
Programming / Re: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(m): 3:54pm On Sep 26, 2012
ok am waiting!!!
Programming / Re: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(m): 1:28pm On Sep 11, 2012
I can teach you the best i know,
Programming / Re: Letter From The Moderator - Please Read by mmsh350(m): 1:16pm On Sep 11, 2012
Thank u cheesy
Programming / Re: How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(m): 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);
}
}

1 Like

Programming / How To Create A Simple Calculator Using Java Programing Language GUI by mmsh350(m): 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 Like

(1) (of 1 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.