How to show alert pop-up in in Cocoa on macOS?

You can use NSAlert in cocoa. This is same as UIAlertView in ios. you can pop-up alert by this NSAlert *alert = [NSAlert alertWithMessageText:@”Alert” defaultButton:@”Ok” alternateButton:@”Cancel” otherButton:nil informativeTextWithFormat:@”Alert pop up displayed”]; [alert runModal]; EDIT: This is the latest used method as above method is deprecated now. NSAlert *alert = [[NSAlert alloc] init]; [alert setMessageText:@”Message text.”]; … Read more

How to dismiss AlertDialog.Builder?

What didn’t work about dismiss()? You should be able to use either Dialog.dismiss(), or Dialog.cancel() alertDialog.setNeutralButton(“Cancel”, new DialogInterface.OnClickListener() { // define the ‘Cancel’ button public void onClick(DialogInterface dialog, int which) { //Either of the following two lines should work. dialog.cancel(); //dialog.dismiss(); } });

How to handle login pop up window using Selenium WebDriver?

Use the approach where you send username and password in URL Request: http://username:password@the-site.com So just to make it more clear. The username is username password is password and the rest is usual URL of your test web Works for me without needing any tweaks. Sample Java code: public static final String TEST_ENVIRONMENT = “the-site.com”; private … Read more

JavaFX Alerts and their size

I have made the following workaround: Alert alert = new Alert(AlertType.INFORMATION, “Content here”, ButtonType.OK); alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); alert.show(); So the window will resize automatically according to the content.

How to get Text BOLD in Alert or Confirm box?

You can’t do it. But you can use custom Alert and Confirm boxes. You can read about some User Interface libraries here: http://speckyboy.com/2010/05/17/15-javascript-web-ui-libraries-frameworks-and-libraries/ Most common libraries are: http://jqueryui.com/ http://mootools.net/ http://www.prototype-ui.com/ http://script.aculo.us/ http://developer.yahoo.com/yui/

Change button color in AlertDialog

Here is how I did. AlertDialog.Builder customBuilder = new AlertDialog.Builder(new ContextThemeWrapper(this,android.R.style.Theme_Dialog)); customBuilder.setTitle(R.string.popup_error_title); customBuilder.setNegativeButton(“Exit application”, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { MyActivity.this.finish(); } }); AlertDialog dialog = customBuilder.create(); dialog.show(); Button b = dialog.getButton(DialogInterface.BUTTON_NEGATIVE); if(b != null) { b.setBackgroundDrawable(getResources().getDrawable(R.drawable.my_button)); } I find the drawable here

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)