joptionpane Questions
2
Solved
I have a question about joptionpane.
Using JOptionPane.showMessageDialog(...), we can create a message dialog. But how to close it programmatically?
Sokul asked 25/3, 2012 at 14:3
7
Solved
I had created a JOptionPane of type showInputDialog. When it opens it, it shows me two buttons: OK and Cancel. I would like to handle the action when I push on Cancel button, but I don't know how t...
Waters asked 15/7, 2012 at 17:50
3
Solved
I'm using following code to display error message in my swing application
try {
...
} catch (Exception exp) {
JOptionPane.showMessageDialog(this, exp.getMessage(), "Error", JOptionPane.ERROR_MES...
Gaven asked 23/12, 2012 at 13:53
6
Solved
I am trying to make a JOptionPane get an input and assign it to an int but I am getting some problems with the variable types.
I am trying something like this:
Int ans = (Integer) JOptionPane.showI...
Mccullers asked 25/6, 2010 at 19:41
7
Solved
JOptionPane can be used to get string inputs from user, but in my case, I want to display a password field in showInputDialog.
The way I need is the input given by the user should be masked and th...
Aladdin asked 16/1, 2012 at 14:14
6
Coming from .NET i am so used calling Alert() in desktop apps. However in this java desktop app, I just want to alert a message saying "thank you for using java" I have to go through this much suff...
Sadden asked 2/2, 2012 at 20:27
6
Solved
I have added JOptionPane to my application but I do not know how to change background color to white?
`int option = JOptionPane.showConfirmDialog(bcfiDownloadPanel,
new Object[]{"Host: " + source...
Fairchild asked 30/1, 2012 at 13:54
4
Solved
Is it possible to assign hotkeys and mnemonics to the buttons in a JOptionPane Dialog? I'd like to be able, in a JOptionPane generated message dialog with the options Yes, No and Cancel, press Y to...
Weddle asked 1/10, 2009 at 18:6
5
Solved
I am working on an application which pops up a JOptionPane when a certain action happens. I was just wondering if it was possible that when the JOptionPane does pop up how can you still use the bac...
Keldah asked 18/4, 2011 at 17:17
4
Solved
I need to present a information message that needs to be in the screen for 5 seconds, during this time, user can't close the dialog. The specification says clearly that the dialog shouldn't have an...
Endamoeba asked 2/1, 2013 at 18:8
3
Solved
I was wondering is it possible to change the OK Cancel Button to custom string in java?
I have
JOptionPane.showConfirmDialog(message, title, JOptionPane.OK_CANCEL_OPTION);
Right now, the button ...
Quinones asked 6/1, 2012 at 19:9
3
Solved
Say i'm using the following code to prompt an error message in my simple swing application:
JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE);
Is there any way I c...
Cloudy asked 6/1, 2013 at 14:55
4
Solved
Currently I have a JOptionPane. On clicking a button I am executing following line.
JOptionPane.showInputDialog(this,"Enter your message","Messages",2);
It opens a popup with a text box. This te...
Ginoginsberg asked 14/10, 2011 at 9:13
3
Solved
How might I go about changing the color of a JOptionPane's border?
Here is a screenshot of the border I am talking about:
That blue border is what I am trying to get rid of.
I tried to set UI...
Proboscidean asked 3/7, 2013 at 15:36
8
I am trying to create a message with a Yes or No button. Then a window will appear with a certain message that depends on if the user clicked Yes or No.
Here is my code:
public class test{
publ...
Eslinger asked 6/12, 2011 at 8:5
3
How to remove icon from JOptionPane?
ImageIcon icon = new ImageIcon(image);
JLabel label = new JLabel(icon);
int result = JOptionPane.showConfirmDialog((Component) null, label, "ScreenPreview", JO...
Jestude asked 7/6, 2013 at 10:21
4
Solved
Can you change the font and size of the text of a JOptionPane? I tried it and it works only if I "run file" on that specific java class. If you start the whole project it does not change the font. ...
Sheff asked 13/11, 2014 at 16:41
4
Solved
My JOptionPane code is as follows:
selectedSiteName = JOptionPane.showInputDialog("Enter the name of the new site:");
This renders out an input with a textbox and an OK and Cancel button. I need...
Kaylor asked 1/8, 2009 at 0:10
2
Solved
I am working on a project in which I would like to close a generic JOptionPane programmatically (by not physically clicking on any buttons). When a timer expires, I would like to close any possible...
Pshaw asked 7/8, 2013 at 14:6
8
In order to have custom button captions in an input dialog, I created the following code:
String key = null;
JTextField txtKey = new JTextField();
int answerKey = JOptionPane.showOptionDialog(thi...
Lemures asked 6/6, 2011 at 11:58
3
Solved
I have a question in regards to pressing the cancel button of my inputDialoguebox. I have asked a similar question before so I apologize if I seem to repeat myself.
The main problem I have is tha...
Weimaraner asked 16/3, 2012 at 7:53
2
Solved
I have an arraylist with objects and a running Gui. I looking for a way to popup a little frame or box or something like that which displays the objects from the arraylist. The user now should be a...
Goutweed asked 17/1, 2012 at 18:18
2
Solved
I'm trying to resize the height of the dialog box (JOptionPane) for long sentence with hyperlink.
My code is ..
public class DialogTest {
public static void main(String[] args) throws Exception {...
Cetane asked 27/2, 2014 at 15:28
6
Solved
I have created a DialogUtil which shows numbers of JOptionPan in different situation.
sometimes in my action class call to this method with null parameters as below.
DialogUtil.showNotExist(null,x...
Solberg asked 4/6, 2012 at 12:5
3
Solved
I just started a new java project today, and I'm having a problem with println. Here's my main method:
public static void main(String[] args) {
String stringNumGuards = JOptionPane.showInputDial...
Gernhard asked 30/7, 2013 at 22:50
1 Next >
© 2022 - 2025 — McMap. All rights reserved.