ShowInputDialog Programming Software Development by Zeithgeist Hallo! New in Java, and asking a very stupid question: Can i change the icon "?" in showInputDialog? `cause in JOptionPane.X i can do it, like JOptionPane.ERROR_MESSAGE, or JOptionPane.WARNING_MESSAGE. :mrgreen: Re: ShowInputDialog Programming Software Development by ashwinnaidu hi zeithgeist , yes we can change icon in showInputDialog default is : [B]JOptionPane.showMessageDialog(frame, "Here is Some … Re: showInputDialog ? Programming Software Development by RossMc … what I have so far [CODE]do { String inputString = JOptionPane.showInputDialog(null,"What Is The Name Of Your Character ?"… Re: showInputDialog ? Programming Software Development by musthafa.aj [CODE] String inputString =""; do { inputString = JOptionPane.showInputDialog(null,"What Is The Name Of Your Character ?"); } … Re: ShowInputDialog Programming Software Development by Zeithgeist Thx a LOT. ^^ just a question: why are u writting in default "frame"? I got "null" to show it centered... What is "frame" for? Re: Using showInputDialog to accept integer only Programming Software Development by mKorbel … to add any JComponent to JOptionPane.showInputDialog but return value is from built_in…13}; Integer i = (Integer) JOptionPane.showInputDialog(null, "Select number:\n\from JComboBox"…;, "ShowInputDialog", JOptionPane.PLAIN_MESSAGE, errorIcon, possibilities, … Using showInputDialog to accept integer only Programming Software Development by Lamirp …is to accept an integer from a user using JOptionPane.showInputDialog. A brief example of what I'm currently doing …do { check = true; try { num = Integer.parseInt(JOptionPane.showInputDialog("How many items do you need to list?"… Re: Using showInputDialog to accept integer only Programming Software Development by mKorbel @JamesCherrill great minds thinks alike ---> I see that good point, there is only String for showInputDialog Re: Using showInputDialog to accept integer only Programming Software Development by JamesCherrill OK. I hoped you found a new idea there. :( So the best answer we have is "you can't change the text field in a JOptionPane.showInputDialog, so you will have to create a custom dialog and use a JFornattedTextField". For examples just Google "custom JDialog" Need Help on showInputDialog Programming Software Development by ra2833 … hlep me with the code to substitute the use of showInputdialog. currently i am using the following code to recieve Strings… showInputDialog ? Programming Software Development by RossMc Hi, I am creating a RPG Character Generator and I have a InputDialog box which asks the user to enter there characters name. I have a do while loop to check for if the user entered a character which allows runs through the code if the users enters a correct character name but if the user enters a character name less than 3 characters or more… Re: showInputDialog ? Programming Software Development by musthafa.aj please post your code so far you tried.... Re: showInputDialog ? Programming Software Development by musthafa.aj [CODE] while (firstName.length() > 3 && firstName.length() <12);[/CODE] you try it and reply... Re: showInputDialog ? Programming Software Development by RossMc Tried it and the program still closes when the OK button is pressed with no name entered. Re: Using showInputDialog to accept integer only Programming Software Development by mKorbel use [JFormattedTextField](http://docs.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html) Re: Using showInputDialog to accept integer only Programming Software Development by JamesCherrill mKorbel: Hi. What's the easiest way you know to use a JFormattedTextField for the input in a JOptionPane InputDialog? Re: Using showInputDialog to accept integer only Programming Software Development by Lamirp Yep, thank you guys for the help. I am in a beginners data structures class that is requiring we use JOptionPane. I've been coding Java for a couple years, so I was just trying to see if I could improve upon anything that seemed like it could be cut down. Re: Need Help on showInputDialog Programming Software Development by oceanboy Have you tried [I]JOptionPane[/I] class Re: Need Help on showInputDialog Programming Software Development by ra2833 [QUOTE=oceanboy]Have you tried [I]JOptionPane[/I] class[/QUOTE] doesn't JOptionPane meant that i will be using a dialog box? if so, this is not what i want, i do not want to use dialog boxes.... what i am looking for is something simple, that will recieve a string from the console or a function call. for example in C++: cout <<… Re: Need Help on showInputDialog Programming Software Development by ra2833 moderator please retire this thread? thx ra2833 help with polymorphism and inheritance...getting null values Programming Software Development by joebanks …;Exit"}; Object selectedValue = JOptionPane.showInputDialog(null, "Please select one of…"No" }; Object decision = JOptionPane.showInputDialog(null, "Please select one of the following:&… Need help with error Exception in thread "main" java.lang.Nu Programming Software Development by gator6688 …else if(workerType.equalsIgnoreCase("Hourly")){ first=JOptionPane.showInputDialog("Enter employee " + empNo + "… else if(workerType.equalsIgnoreCase("Commission")){ first=JOptionPane.showInputDialog("Enter employee " + empNo + "… Please help me with my home work Programming Software Development by rjay_lolerzz … q10 = Integer.parseInt(r10); String r11 = JOptionPane.showInputDialog("Enter EXAM: "); q11 = Integer.parseInt(…quot;PRELIM LAB"); String c = JOptionPane.showInputDialog("Enter PMP1: "); x = … Java word guessing game - problem Programming Software Development by Potty391 …////////////////// case 7: patrn = Integer.parseInt(JOptionPane.showInputDialog("What is the next number: \n 1000… ////////////////// case 9: patrn = Integer.parseInt(JOptionPane.showInputDialog("What is the next number: \n 1000… Date and converting Programming Software Development by cobaltfive …switch(empType) { case 1: first=JOptionPane.showInputDialog(null,"What is your first name?"…salaryString); break; case 2: first=JOptionPane.showInputDialog(null,"What is your first name?"… Re: Date and converting Programming Software Development by stultuske … break; case 2: setBasics(); wageString=JOptionPane.showInputDialog(null,"What is hourly wage?","…break; case 2: setBasics(); wageString=JOptionPane.showInputDialog(null,"What is hourly wage?","… Need help with Object Oriented Programming Programming Software Development by Dio1080 ….numberofdoors = Integer.parseInt(Numberofdoorsss); String Horsepowersss = JOptionPane.showInputDialog("Enter car horsepower"); chevy.horsepower = Integer.parseInt….numberofdoors = Integer.parseInt(Numberofdoorssss); String Horsepowerssss = JOptionPane.showInputDialog("Enter car horsepower"); bmw.horsepower = Integer.parseInt… Help with Inheritance Programming Software Development by BobbieJean ….QUESTION_MESSAGE); sales = Double.parseDouble(salesString); rateString = JOptionPane.showInputDialog(null, "What percent of commission do you receive?"….QUESTION_MESSAGE); sales = Double.parseDouble(salesString); rateString = JOptionPane.showInputDialog(null, "What percent of commission do you receive?"… Re: Help with Inheritance Programming Software Development by kvass ….QUESTION_MESSAGE); sales = Double.parseDouble(salesString); rateString = JOptionPane.showInputDialog(null, "What percent of commission do you receive?"….QUESTION_MESSAGE); sales = Double.parseDouble(salesString); rateString = JOptionPane.showInputDialog(null, "What percent of commission do you receive?"… Re: Help with Inheritance Programming Software Development by BobbieJean …JOptionPane.QUESTION_MESSAGE); sales = Double.parseDouble(salesString); rateString = JOptionPane.showInputDialog(null, "What percent of commission do you receive?"….QUESTION_MESSAGE); sales = Double.parseDouble(salesString); rateString = JOptionPane.showInputDialog(null, "What percent of commission do you receive?"…