Java Code Examples for com.alee.laf.optionpane.WebOptionPane#showMessageDialog()

The following examples show how to use com.alee.laf.optionpane.WebOptionPane#showMessageDialog() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainFrame.java    From desktopclient-java with GNU General Public License v3.0 6 votes vote down vote up
private void showAboutDialog() {
    WebPanel aboutPanel = new WebPanel(new GridLayout(0, 1, View.GAP_SMALL, View.GAP_SMALL));
    aboutPanel.add(new WebLabel("Kontalk Java Client v" + Kontalk.VERSION));
    WebLinkLabel linkLabel = new WebLinkLabel();
    linkLabel.setLink(View.KONTALK_SITE);
    linkLabel.setText(Tr.tr("Visit kontalk.org"));
    aboutPanel.add(linkLabel);
    WebLabel soundLabel = new WebLabel(Tr.tr("Notification sound by")+" FxProSound");
    aboutPanel.add(soundLabel);
    Icon icon = Utils.getIcon("kontalk.png");
    WebOptionPane.showMessageDialog(this,
            aboutPanel,
            Tr.tr("About"),
            WebOptionPane.INFORMATION_MESSAGE,
            icon);
}
 
Example 2
Source File: View.java    From desktopclient-java with GNU General Public License v3.0 5 votes vote down vote up
public static void showWrongJavaVersionDialog() {
    String jVersion = System.getProperty("java.version");
    if (jVersion.length() >= 3)
        jVersion = jVersion.substring(2, 3);
    String errorText = Tr.tr("The installed Java version is too old")+": " + jVersion;
    errorText += EncodingUtils.EOL;
    errorText += Tr.tr("Please install Java 8.");
    WebOptionPane.showMessageDialog(null,
            errorText,
            Tr.tr("Unsupported Java Version"),
            WebOptionPane.ERROR_MESSAGE);
}