Viewing code of GUI
// ------ ../cgi-bin/java/GUI.java --------------
//--- Programmed By Rajesh -----
/*
*
* Programmed By Pravab Dhakal
* Examples. August 22 2005
*/
import javax.swing.*;
public class GUI
{
public static void main(String args [])
{
String name =
JOptionPane.showInputDialog("Which is your favourite band?");
String message = "My favourite band is"+name;
String name2 =
JOptionPane.showInputDialog("Which singer songs do you love?");
String message2 = "I love songs of "+name2;
String name1 =
JOptionPane.showInputDialog("Which is your favourite song?");
String message1 = "My favourite song is"+name1;
String rollString =
JOptionPane.showInputDialog("What is your favourite no:");
int roll= Integer.parseInt(rollString);
//message+= "\nMy favourite band is:"+name;
message+= "\nI love songs of "+name2;
message+= "\nMy favourite song is:"+name1;
message+= "\nMy favourite Nubmer is:"+roll;
//message+= "\nWe R making GUI";
JOptionPane.showMessageDialog(null, message);
}
}
Home
Library Home:
- 1 Addition
- 2 BoxUser
- 3 BoxUser1
- 4 BoxUser2
- 5 Calc
- 6 Check
- 7 Circle
- 8 point
- 9 CircleMain
- 10 Clock
- 11 Compare
- 12 Constant
- 13 raan
- 14 CurentThreadDemo
- 15 sidd
- 16 CurrentThread
- 17 multi
- 18 CurrentThreadDemo
- 19 Driver
- 20 Fact
- 21 sirish
- 22 Factorial
- 23 Factorlial
- 24 FrameAndMenu
- 25 GF
- 26 GUI
- 27 GUITest
- 28 GrandFather
- 29 HariNarayanDemo
- 30 HariNarayanDemor
- 31 HariNayaranDemo
- 32 HariNayaranDemoR
- 33 HelloKU
- 34 HelloUser2
- 35 HelloWorld
- 36 HelloWorld2
- 37 Line
- 38 Line1
- 39 Main
- 40 MainCircle
- 41 MethodsTest
- 42 MyName
- 43 MyName1
- 44 ObjCreator
- 45 Recursion
- 46 Sort
- 47 multi1
- 48 StupidThreadDemoE
- 49 StupiedThread
- 50 StupiedThreadDemo
- 51 notepad
- 52 StupiedThreadDemoE
- 53 Swap
- 54 Symphony
- 55 anABC
- 56 calulation
- 57 creation
- 58 jframe
- 59 modifiedJFrame