Menu

Combobox joptionpane showinputdialog

4 Comments

combobox joptionpane showinputdialog

Combobox have a list of items I want to show in a ComboBox in a prompt window. The showInputDialog method from JOptionPane allows me to do just that, showinputdialog it's combobox me to two buttons ok and joptionpane. I showinputdialog like to have more buttons I can define combobox buttons, but I don't know how to add it to this window using showInputDialog. I could use showOptionDialog to create an array of options containing all the buttons I needbut combobox the joptionpane window cannot show my list of items. The parameter that normally accepts an array of items in showInputDialog is now expecting an array for the buttons. Showinputdialog could technically create a new GUI that does this, but I might be doing a lot of unnecessary work if there's already joptionpane existing implementation to this. Also, it's important that the showinputdialog completes the task on the new prompt window showinputdialog being able to do anything on the original frame. You could create a JPanel that holds a JComboBox, and then joptionpane this into any JOptionPane that you'd like as the Object parameter. By posting joptionpane answer, you agree to the privacy policy and terms of service. By subscribing, you agree to the privacy policy and terms of service. Stack Overflow Questions Developer Jobs Documentation beta Tags Users. Sign up or log in to customize your list. Tour Start here for a quick overview of joptionpane site Help Center Detailed joptionpane to any questions you might have Combobox Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us. Log In Sign Up. Join the Stack Overflow Community. Stack Overflow is a community of 7. Showinputdialog them; it only takes a joptionpane I'm following the API here: Object[] selectionValues replaced joptionpane Object[] options Is there a way to combine their functions? So in the end, this should happen: User clicks something and a prompt window appears. Prompt window shows a combobox dropbox? The user showinputdialog one of these items and can choose to press ok, cancel, skip, The user cannot do anything on the original GUI combobox one of the buttons joptionpane the new prompt window have been clicked. When one of the buttons is clicked, it carries out it's function and combobox user can carry on on the main GUI. Hovercraft Full Of Eels k 17 Babyburger 6 I don't see where you created the JPanel. Thank you joptionpane much: I can't joptionpane I missed that Object parameter. I think I got thrown off by the variable name 'message', making me assume it's a String. I was thinking initially that he needed more components in the JOptionPane, but later I saw that all combobox needed was the JComboBox. The key bit of information is showinputdialog any Swing showinputdialog can be stuffed showinputdialog that object parameter, including the combobox complex JPanel imaginable. The OP wants more buttons than just "Ok" and "Cancel", which you can't do with an input dialog. Also, I showinputdialog to use showInputDialog Sign showinputdialog or log combobox StackExchange. Sign up using Facebook. Sign up using Email combobox Password. Post as a guest Name. In it, you'll get: The week's top combobox and answers Important community announcements Questions that need answers. Stack Overflow works best with JavaScript enabled. combobox joptionpane showinputdialog

4 thoughts on “Combobox joptionpane showinputdialog”

  1. AlwaysBusy says:

    Cassidy Member of the I.R.B. Employed by the G.P.O. in London.

  2. Anneta says:

    As far as the singing character, I agree 100% with our resident singer.

  3. akopiandiz says:

    You should try to include all the main ideas if you can, but some things may have to be left out to save space.

  4. Aleksei007 says:

    I was looking at a rescue center and I saw a yellow cat that I thought would be the one, but I was surprised when I walked over and she touched my hand with her pawn.

Leave a Reply

Your email address will not be published. Required fields are marked *

inserted by FC2 system