Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What you want to do is find out how to use Look and Feel of an application. That is how different systems have different looks, and also what separates yours from his. Here is a link to describe it to you :) <a href="http://ruby.fgcu.edu/courses/mpenderg/ism3230Notes/lookandfeel.html" rel="nofollow">JOptionPane look and feel</a></p> <p>Another option you can do is check the javadoc(s) for the JOptionPane. It gives you many constructor defaults so that you have the ability to change the way it looks such as:</p> <p>A list of options that you can do with JOptionPane that can be viewed <a href="http://www.java2s.com/Tutorial/Java/0240__Swing/CreatingaJOptionPane.htm" rel="nofollow">here</a></p> <pre><code>public JOptionPane() JOptionPane optionPane = new JOptionPane(); public JOptionPane(Object message) JOptionPane optionPane = new JOptionPane("Message"); public JOptionPane(Object message, int messageType) JOptionPane optionPane = new JOptionPane("Message", JOptionPane.WARNING_MESSAGE); public JOptionPane(Object message, int messageType, int optionType) JOptionPane optionPane = new JOptionPane("Question?", JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION); public JOptionPane(Object message, int messageType, int optionType, Icon icon) Icon printerIcon = new ImageIcon("yourFile.gif"); JOptionPane optionPane = new JOptionPane("Question?", JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, printerIcon); public JOptionPane(Object message, int messageType, int optionType, Icon icon, Object options[ ]) Icon greenIcon = new DiamondIcon(Color.GREEN); Icon redIcon = new DiamondIcon(Color.RED); Object optionArray[] = new Object[] { greenIcon, redIcon} ; JOptionPane optionPane = new JOptionPane("Question?", JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, printerIcon, optionArray); public JOptionPane(Object message, int messageType, int optionType, Icon icon, Object options[], Object initialValue) JOptionPane optionPane = new JOptionPane("Question?", JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, printerIcon, optionArray, redIcon </code></pre> <p>hope this helps</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload