Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3290

Re: Location of image fil

From "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Subject Re: Location of image fil
Message-ID <5b74b9ee-27fd-45c5-bcfb-b5b1e73288a3@e6g2000prf.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
References <f6f395c1-d053-48ad-80ae-5c311a2f5c9b@e10g200
Date 2011-04-27 15:44 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
On Mar 18, 11:25 pm, Chanchal <chanchal.ja...@gmail.com> wrote:
> > I think Axel has identified the root answer
> > to this problem.  Try setting the default
> > locale and using a JOptionPane.
>
> Actually that's exacltly what i have done. But still the button text
> seems ..

..seems?  How about backing that up with *source*, ..

>...to go along with the locale of the OS. :-(

..like

<sscce>
import javax.swing.*;
import java.util.Locale;

class LocaleTest {

  public static void main(String[] args) {
    Locale.setDefault(Locale.GERMAN);   // "Ja/Nein"
    //Locale.setDefault(Locale.ITALIAN);  // "Si/No"
    //Locale.setDefault(Locale.FRENCH);   // "Oui/Non"

    JOptionPane jop = new JOptionPane(
      "Message",
      JOptionPane.INFORMATION_MESSAGE,
      JOptionPane.YES_NO_OPTION
      );

    JDialog dialog = jop.createDialog(
      null,
      "Title");
    dialog.setVisible(true);

  }
}
</sscce>

What result are you getting for German there?
(Or either of the other two commented locales).

--
Andrew T.
PhySci.org

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread


Thread

Re: Location of image fil "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:44 +0000

csiph-web