How can i create a confirmation window?

Hi,

i want to create a confirmation window with two Buttons( yes and no). This window should come in focus if the user want to execute the node. I am a starter in KNIME :)

Can someone help me?

THX

Markus

First, this is a bad usage concept since KNIME workflows should also run without any graphical user interface, e.g. via the Batch Executor. Second, if you want to prevent a node from being execute at all, then you need to dig deep into the framework. You can (but you should not) open a simple Swing dialog inside the NodeModel's execute but I strongly discourage you from doing so.

What is your use case for opening a dialog before execution, probably there is a better alternative?

I have solved my probelm with a checkbox, but it is possible if the checkbox is false to get a infobox (a information window)?

 

THX

 

Markus

You could use "setWarningMessage" in the execute method. This doesn't give you an infobox but at least a yellow exclamation mark under node the with the corresponding message.