About 7,280,000 results
Open links in new tab
  1. Java JOptionPane - GeeksforGeeks

    Apr 24, 2025 · Java JScrollPane is a component in the Java Swing library that provides a scrollable view of another component, usually a JPanel or a JTextArea. it provides a scrolling functionality to the display for which the size changes dynamically.

  2. java - Popup Message boxes - Stack Overflow

    Aug 16, 2011 · Have you placed println statements in the else block to show that it is entered and despite being entered the JOptionPane doesn't show? You need to do some debugging here. Here is the code to a method I call whenever I want an information box to pop up, it hogs the screen until it is accepted:

  3. java - How do I make a popup window with just a textfield

    Jun 19, 2013 · I want to create a popup window when the user clicks a "Load from file" button. I want that popup box to have a text box and an "OK" "Cancel" option. I have read through a lot of Java Documentatio...

  4. User input and Java's JOptionPane example - TheServerSide

    Apr 19, 2025 · With one simple line of code, Java’s JOptionPane enables a program to prompt the user with a Windows-based input dialog box, and return any user input as a String. var name = javax.swing.JOptionPane.showInputDialog("What is your name?");

  5. How to Make Dialogs (The Java™ Tutorials > Creating a GUI With …

    A fourth method, showInputDialog, is designed to display a modal dialog that gets a string from the user, using either a text field, an uneditable combo box or a list. Here are some examples, taken from DialogDemo.java, of using showMessageDialog, showOptionDialog, and the JOptionPane constructor.

  6. 2.14 Dialog Boxes Flashcards - Quizlet

    Mar 10, 2025 · is a small graphical window that displays a message to the user or requests input. You can quickly display dialog boxes with the JOptionPane class.

  7. Java User Input (Scanner class) - W3Schools

    Java User Input. The Scanner class is used to get user input, and it is found in the java.util package. To use the Scanner class, create an object of the class and use any of the available methods found in the Scanner class documentation. In our example, we will use the nextLine() method, which is used to read Strings:

  8. JOptionPane (Java Platform SE 8 ) - Oracle

    JOptionPane makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something. For information about using JOptionPane, see How to Make Dialogs, a section in The Java Tutorial. Asks a confirming question, like yes/no/cancel. Prompt for some input. Tell the user about something that has happened.

  9. Message Dialogs in Java (GUI) - GeeksforGeeks

    Oct 26, 2021 · We call the static showMessageDialog () method of the JOptionPane class to create a message dialog. We provide the dialog’s parent, message text, title, and message type. The message type is one of the following constants : Methods Used :

  10. java - How to make a Gui actually prompt for the dialog boxes?

    Oct 9, 2014 · So I was trying to understand using a Gui in Java and did so by making a little guess the number game. It compiles correctly, however when I run the program it just shows the frame with "Congratulations you win!" at the top. My main question is why the dialog boxes aren't popping up at all and what I should do to fix that.

  11. Some results have been removed