This post originated from an RSS feed registered with Java Buzz
by Scott Delap.
Original Post: JavaLobby - JOptionPane Can Hold More Than Text
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
JavaLobby - JOptionPane Can Hold More Than Text Many people don't seem to know that the existing JOptionPane class ( javax.swing.JOptionPane ), which has all of those nifty static methods for quick dialog opening ( showOptionDialog , showConfirmDialog , showInputDialog , and showMessageDialog ), accepts more than just text as the 'message'. In fact, all of the static methods (as well as the JOptionPane constructor) take an Object as the message, not a String. This is intentional - the BasicOptionPaneUI class considers the message object as not only being some form of object that can be converted to a String, but also whether or not the message object was in fact a component...