java - Simple SWT Alert Message with custom icon? -
I am new to SWT, I am creating a GUI and warning message after I click on the user "OK" button Want to give Preferably, I did a little searching with the " check " icon, as well as the "Your parameters are incorrect" and "Code is correct" and it's MessageBox ()
It may be possible but it does not have a check or tick icon, I do not even want to bother creating a custom image and then want to apply it in the dialog. With MessageBox ()
I will have to create a new message box object, set text and then open the text ... does not have a simple, one line solution like this in swing? StaticClass.showmsg (type, "string");
for example? If possible, I would like to avoid JFAC because there is another library and I found many mistakes with JFAS, it can not be difficult ... It is also that I have got the code with MessageBox () . Do not look moral.
EDIT: I Added and also in the GPS there is no checkbox (message delay) It seems that there is no other chance, I have to add my own check mark, but how? My current warning message:
MessageDialog.openWarning (Display.getDefault (.) GetActiveShell (), "Warning", "Input parameters are incorrect!")
< P> I wanted to have a MessageDialog.openOK ()
, but this is not how I can insert my own icons in these messages?
SWT Messagebox uses the OS / Window system's native messaging dialog (at least on Windows) There is no predefined check image for the messagebox
in SWT.
OK for your parameters such as an informational message
If you do not meet the requirements, you can either reach.
Write JFace or your own message dialog in Pure SWT If you choose an option for JFace, use MessageDialog
for standard communications such as error, alerts, warnings, etc. Use or use IconAndMessageDialog
if you need more control over the contents of the dialog. / P>
Comments
Post a Comment