Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: how to use this variable ? (JOptionPane)

  1. #1
    Banned
    Join Date
    Apr 2012
    Posts
    38
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default how to use this variable ? (JOptionPane)

    import javax.swing.*;
    class biodata {
    public static void main(String[]args) {
    JOptionPane.showInputDialog (null,"hello");
    String nama = JOptionpane.showInputDialog (null,"masukkan nama:");
    String nim = JOptionpane.showInputDialog (null,"masukkan nim:");
    String kelas = JOptionpane.showInputDialog (null,"kelas:");
    JOptionPane.ShowMassageDialog(null, "nnama anda adalah "+nama+"\nnim anda adalah"+nim+"\nkelas anda adalah "+kelas);

    }
    }


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: how to use this variable ? (JOptionPane)

    When posting code, please use the highlight tags.

    What's your question? What variable are you trying to use? What is this code supposed to do? What does it do instead?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Member
    Join Date
    Jan 2012
    Location
    Hellas
    Posts
    284
    Thanks
    11
    Thanked 59 Times in 57 Posts

    Default Re: how to use this variable ? (JOptionPane)

    There are some spelling mistakes in your code (ie JOptionpane).
    Java is case sensitive. JOptionPane != JOptionpane

  4. #4
    Banned
    Join Date
    Apr 2012
    Posts
    38
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: how to use this variable ? (JOptionPane)

    Quote Originally Posted by KevinWorkman View Post
    When posting code, please use the highlight tags.

    What's your question? What variable are you trying to use? What is this code supposed to do? What does it do instead?
    my question is where usually class JOptionpane used?, and what is import javax swing?, this code is for input some bio-data, i use variable static, yes this code instead

  5. #5
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: how to use this variable ? (JOptionPane)

    Quote Originally Posted by erdy_rezki View Post
    my question is where usually class JOptionpane used?,
    First hit for googling Java JOptionPane: How to Make Dialogs (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

    Quote Originally Posted by erdy_rezki View Post
    and what is import javax swing?,
    First hit for googling Java import tutorial: Using Package Members (The Java™ Tutorials > Learning the Java Language > Packages)

    Quote Originally Posted by erdy_rezki View Post
    this code is for input some bio-data, i use variable static, yes this code instead
    You misunderstand me. I was asking you for a more specific question, since just posting your code without an actual question isn't really something we can answer.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    Banned
    Join Date
    Apr 2012
    Posts
    38
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: how to use this variable ? (JOptionPane)

    Quote Originally Posted by KevinWorkman View Post
    First hit for googling Java JOptionPane: How to Make Dialogs (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)


    First hit for googling Java import tutorial: Using Package Members (The Java™ Tutorials > Learning the Java Language > Packages)


    You misunderstand me. I was asking you for a more specific question, since just posting your code without an actual question isn't really something we can answer.
    thanks for the explain and im sorry about the misunderstanding

Similar Threads

  1. Replies: 5
    Last Post: November 16th, 2011, 11:22 AM
  2. [SOLVED] JOptionPane problem
    By sonicjr in forum AWT / Java Swing
    Replies: 8
    Last Post: September 30th, 2011, 03:39 PM
  3. Display in JOptionPane
    By t-rank in forum What's Wrong With My Code?
    Replies: 4
    Last Post: October 19th, 2010, 12:09 AM
  4. Change to JOptionPane
    By Liuric in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 1st, 2010, 12:07 AM
  5. JOptionPane using If and Else
    By Liuric in forum Member Introductions
    Replies: 7
    Last Post: October 1st, 2010, 12:05 AM