Questions tagged [joptionpane]

JOptionPane is a Java class that makes it easy to pop up a standard dialog box that prompts users for a value or informs them of something.

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. Related examples may be found here.

1895 questions
0
votes
1 answer

JOptionPane Input Dialog how to decide if the value is 2 or JOptionPane.CANCEL_OPTION

i use the following Code to get an InputDialog: String c = JOptionPane.showInputDialog("Select number",JOptionPane.OK_OPTION); I also want that the User only uses IntegerValues between 0 and 100. I handle this by the following…
Jaran
  • 212
  • 2
  • 10
0
votes
1 answer

How to create a tabbed Joptionpane for multiple data input

I'm having trouble figuring out how to make a Tabbed Joptionpane for user input. Basically I need to take multiple values from user input, but instead of multiplied dialog boxes, I would like them to be able to enter all the separate data into one…
0
votes
3 answers

JOptionPane problems ( Java)

Code: JOptionPane.showMessageDialog(null,"We're going to calculate the volume of a cylinder", JOptionPane.INFORMATION_MESSAGE); Error: Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type:…
ExtremeSwat
  • 794
  • 1
  • 12
  • 34
0
votes
1 answer

Using javax.swing to input information and store it in Array List

Hi I am making a project which reads a list of books from file and I want to add possibility to add new book when button is pressed. But I get many errors. Look at my code: public class Biblioteka { public static void main(String[] args) { …
0
votes
1 answer

JTextField Doesn't show properly

I'm making a application where you can manage the inventory of a store. I want to have the ability to change the current stock of certain items. First you select the items you want to change from a JTable using checkboxes then you click a JButton…
Liam de Haas
  • 1,258
  • 3
  • 18
  • 39
0
votes
1 answer

JOptionPane - Drop Down: How to subtract an option that somebody has chosen?

I am a beginner and java and making a ludo board. I am making a Drop Down MenuJOptionPane where Player # 1 picks what color he wants to be (green, yellow, blue, red). When it comes to Player # 2 I want him to be able to choose all the colors except…
user2399525
  • 91
  • 1
  • 1
  • 7
0
votes
1 answer

Why ChangeListener of JTabbedPane loads with starting of main JFrame?

Following is snap of my ChangeListner method, when i run my project, before i actually reach to tabbedPan the JOptionDialog pops out(actually along with jframe loads)! My actual purpose is i want to listen the changing of tabs so that i can load…
dip
  • 3,548
  • 3
  • 24
  • 36
0
votes
1 answer

JOptionPane, help on return

this is my first post on this website, as this website has been a lot of help. I have came up with not so much a problem, but something I want to learn on how to do. Here is my code String a = JOptionPane.showInputDialog(null,"Please pick something…
Brandon G
  • 39
  • 8
0
votes
1 answer

Using JOptionPane on an HTML/PHP page

/I am trying to get a simple message to pop up. I put the code in as I have seen on every tutorial page but it gets errors that I don't quite understand.