JS-style alert box in java

What's the Java Swing counterpart for the JavaScript alert() popup (if there is one)?


An basic way to accomplish such a popup is to use JOptionPane.showMessageDialog, see here.

JOptionPane.showMessageDialog(frame, "here comes the text.");   
// assumes frame to be a reference to the desired parent frame

Think you are looking for JOptionPanes but here is a good description of the different dialogs: http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html

How to create a dialog box in Java:

Need Your Help

simple javascript delegation using __proto__

javascript inheritance prototype

I'm used to Java so when i try to so something like this:

Colour Name to RGB/Hex/HSL/HSV etc

colors hex rgb hsv hsl

I have come across this great function/command. Colour to RGB, you can do this: