Input « Dialog « Java Swing Q&A





1. Need an input dialog to populate with text    stackoverflow.com

I am a student at ISU. I was working on a homework assignment where I wanted to get text that was selected (highlighted) in a TextArea to appear in a JOptionPane ...

2. Retrieve input entered in a JDialog    stackoverflow.com

I extended JDialog to create a custom dialog where the user must fill some fields : dialog How should I retrieve the data entered ? I came up with a solution that ...

3. Model Dialog - Swing. Blocking input to only certain parts of the UI    stackoverflow.com

Scenario: I have a screen, top part of the screen is some text fields, bottom part of the window is a list. Under certain circumstance I want to raise a modal (yes/no) ...

4. similar input dialog-creation patterns/swing    stackoverflow.com

I have a created a UI in swing using NetBeans.
There are some use cases where the user presses buttons and a JDialog appears as a result.
The JDialog accepts input via JComboBox, ...

5. Validate Input Dialog box    stackoverflow.com

HI, I feel rather stupid asking this as I should be able to do it but I can't! I have also checked on the net and in my book and for ...

6. Globally disable all mouse input when a JDialog is showed    stackoverflow.com

I would like to implement what follows: when my application perform some critics operations or produce some errors, i want to display an alert JDialog telling the user what is happening. Now, because ...

7. how to check if user has input something or not in JDialogBox?    stackoverflow.com

I have created a custom dialog box which requires 3 fields

public class Test{

    public static void main(String args[])

    {

       ...

8. Java - unable to set dialog modal to enable a backframe while dialog is waiting for input    stackoverflow.com

  for(int i=0;i<index_imageList.getModel().getSize();i++)
   {

   //displaying the image viewer 
   ImageZoomerFrame imageZoomer = new ImageZoomerFrame(image, zoom_percentage, imagePath);
   imageZoomer.setSize(Toolkit.getDefaultToolkit().getScreenSize());
   imageZoomer.validate();

   ...

9. How to stop Java from running the entire code with out waiting for Gui input from The user    stackoverflow.com

Im fairly new to Java and im just looking for a little help
Im trying to create a program which allows the user to enter as a gui the name ...





10. Help !! Extracting multiple input from a customized JDialog box    coderanch.com

Hi Karl, As a first step create a class that contains all the information that might come from the dialog (DialogData). Once you have that you can use it to both send and recieve data from your dialog. public class MyDialog extends JDialog { boolean okHit; // ... public void actionPerformed( ActionEvent ae ) { if( okButton ) okHit = true; ...

11. JDIALOG input    coderanch.com

12. getting input from JDialog    coderanch.com

13. Dialog Input Question    coderanch.com

I'm tyring to implement a dialog box that has a few text areas for user to type data, and I have found a couple of ways to do it: 1) using the JDialog way or 2) laying out the text fields and button, i.e. crude JDialog imitator. 1) Firstly, is there an alternative method? 2) I noticed with method #2, the ...

14. Want to show **** in input dialog.    coderanch.com

15. separating input in a dialog    coderanch.com

I am creating an application that will request input information from the user, via a dialog box, based on an item selected in a list. Each list selection will request a different set of information. There is some data that is common to all selections that I would like to separate from the selection specific data. I would like to create ...

16. JDialog- Multiple inputs    coderanch.com

You need to create a class with one instance variable for each value you want to return (7 in your case). Create the form and add "Accept" and "Cancel" buttons. When the user chooses "Accept", then transfer the values from the form (JTextField, JComboBox) to the instance variables and shut down the dialog form. When the user chooses "Cancel", then set ...





17. Two Input Dialogs in the Same Window?    coderanch.com

using package javax.swing, how could I get a total of 3 input dialogs in the same window? For example, if I need to ask for feet and inches so that the input dialogs are along the same line, and i need to ask a weight value, so I would need 3 input dialogs altogether. I will be using JOption.pane.InputDialog of course. ...

18. JDialog : Custom Input    coderanch.com

This might get you started (it's rough) import java.awt.*; import java.awt.event.*; import javax.swing.*; class Testing extends JFrame { JLabel lbl = new JLabel("Name = "); public Testing() { setDefaultCloseOperation(EXIT_ON_CLOSE); setLocation(400,300); JPanel main = new JPanel(new BorderLayout()); main.add(lbl,BorderLayout.NORTH); JButton btn = new JButton("Enter name"); btn.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { class GetName extends JDialog { JTextField tf = new JTextField(10); public ...

19. input errors in JDialogs    coderanch.com

May be a did not understand the question, but why not? Of corse you can add JLabel to the JDialog. Try this: package jdialog; import javax.swing.JFrame; import javax.swing.JButton; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JDialog; import javax.swing.JTextField; import javax.swing.JLabel; import javax.swing.JPanel; public class Test extends JFrame{ JButton b = new JButton("Open Dialod"); public Test() { this.getContentPane().add(b, "South"); b.addActionListener(listener); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setSize(650, 500); this.setLocation(200, ...

20. input dialog box with 2 options.....    coderanch.com

Hello, I'm trying to let an input dialog appear with two input options (at the same time), whereby one can choose to make use of both or one of the options.... so far this is what Ive been able to implement (i.e. that two input dialogs are shown one after the other.) public static String searchReplace(String panestring){ String search = JOptionPane.showInputDialog("search: ...

21. how to disable cancel button in the input dialog box    coderanch.com

Everything I've said has been helpfull: a) It was noted you cross posted. This upsets people because they could be wasting time answering a question that has already been answered. b) I told you the answer was in the API, if you look at the different methods that can be used. c) I told you the tutorial has examples that shows ...

22. JDialog input - How?    coderanch.com

Hello again. I am starting with Swing now. Since I have little experience (for now) with it, I got stuck with the problem. Here is the deal: I have a simple main frame for application, and user can choose menu item (let's say it's Login) which shows simple dialog (for providing username and password). I implemented dialog as extension to JDialog ...

23. Multiple Line Input Dialog Box    java-forums.org

Here's something to play around with. It's a bit rough, but it might be enough to get you started. Java Code: import java.awt.*; import java.awt.event.*; import javax.swing.*; class Testing extends JFrame { JLabel lbl = new JLabel("Text entered = "); public Testing() { setDefaultCloseOperation(EXIT_ON_CLOSE); setSize(600,300); setLocation(200,100); JPanel main = new JPanel(new BorderLayout()); main.add(lbl,BorderLayout.CENTER); JButton btn = new JButton("Get some text"); btn.addActionListener(new ...