Brad1
1
Hi, I was just wondering if there is a simple way to use the toaster style popups in spark for my own custom messages.
At the moment I was just wanting to get the following happening:
-
I have created a button in a JPanel in new tab of the main spark window.
-
When the button is clicked, a toaster popup message appears saying Hello World
I would like to generate the popup without actually sending a chat type message (which would i assume cause a new chat window to appear).
private void showToaster() {
SparkToaster toasterManager;
toasterManager = new SparkToaster();
toasterManager.setToasterHeight(200);
toasterManager.setToasterWidth(350);
toasterManager.setDisplayTime(5000);
toasterManager.setTitle(“Hello Wolrd”);
toasterManager.showToaster(SparkRes.getImageIcon(SparkRes.BLANK_24x24));
}
Hope it helps,
Thiago
Brad1
3
Oh that’'s where the Toaster pop-up stuff was hiding!
Thanks, that worked a treat.
Brad.