Alternatively take a look at JOptionPane.showOptionDialog which takes as a
parameter an array of objects which are your options on the buttons, like
this:

Object[] options = { "Apply", "Clear", "Cancel" };
int n = JOptionPane.showOptionDialog(
        parentComponent,
        "Make your choice",
        "Custom button option dialog",
        JOptionPane.YES_NO_CANCEL_OPTION,
        JOptionPane.QUESTION_MESSAGE,
        null,
        options,
        "Apply"
);


> A more productive and flexible approach would be to
> subclass JDialog, create a simple JLabel/JButton GUI
> and use ResourceBundles. JOptionPane is only for
> simple dialog interaction.
> regards-stan
> 
> -----Original Message-----
> From: Perico <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Wednesday, January 31, 2001 9:35 AM
> Subject: How to change text in standard JButtons.
> 
> 
> >Is it possible to change the text shown in JButtons?.
> >
> >For example, in a JOptionPane with YES_NO_OPTIONS, is it possible to get
> the
> >"YES button" displaying "Very Well" instead of "YES".  Or in a
> JFileChooser,
> >that the "Save" button says "Guardar" (in Spanish).
> >
> >The question is that I'm developing a little Java application for Spanish
> >people and I'd like, if it's possible, all the shown text in Spanish.
> >
> >Thanks a lot.
> >
> >
> >
> >
> >_______________________________________________
> >Advanced-swing mailing list
> >[EMAIL PROTECTED]
> >http://eos.dk/mailman/listinfo/advanced-swing
> >
> 
> _______________________________________________
> Advanced-swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/advanced-swing
> 

----
Colin Vipurs, Software Developer, "PA" Listings, Howden
(01430) 455 582

'You were working as a waitress in a cocktail bar...'

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to