Results 1 to 4 of 4
Thread: JOptionPane with String
- 03-21-2010, 05:59 PM #1
Member
- Join Date
- Mar 2010
- Posts
- 12
- Rep Power
- 0
-
- 03-21-2010, 06:11 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
This is what the API documentation has to say about the single 'message' parameter for your JOptionPane:
So wrap all your information in another JComponent (or in an Object[]) and you're in business.A descriptive message to be placed in the dialog box. In the most common usage, message is just a String or String constant. However, the type of this parameter is actually Object. Its interpretation depends on its type:
Object[]
An array of objects is interpreted as a series of messages (one per object) arranged in a vertical stack. The interpretation is recursive -- each object in the array is interpreted according to its type.
Component
The Component is displayed in the dialog.
Icon
The Icon is wrapped in a JLabel and displayed in the dialog.
others
The object is converted to a String by calling its toString method. The result is wrapped in a JLabel and displayed.
kind regards,
Jos
- 03-21-2010, 06:38 PM #4
Member
- Join Date
- Mar 2010
- Posts
- 12
- Rep Power
- 0
Similar Threads
-
JOptionPane
By izzy in forum New To JavaReplies: 1Last Post: 03-17-2010, 04:55 PM -
need help for JOptionPane....
By keycoffee in forum New To JavaReplies: 1Last Post: 02-09-2010, 08:59 AM -
JOptionPane String to int question
By blackstormattack in forum New To JavaReplies: 3Last Post: 03-08-2009, 12:14 AM -
JOptionPane
By whosadork in forum New To JavaReplies: 2Last Post: 10-23-2008, 02:17 AM -
String array for Choice, JOptionPane doesn't show
By themburu in forum Java AppletsReplies: 5Last Post: 05-29-2008, 01:10 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks