Spolszczenie napisów w JFileChooser

Data dodania: 2011-09-13, Autor: Patryk Gąsiorowski, Dodał: Karol, Wyświetleń: 1135
Aby okienko odczytu(zapisu) pliku "JFileChooser" komunikowało się z nami w naszym ojczystym języku, przed pierwszym jego wywołaniem należy wywołać parametry ustawiające parametry językowe w UIManager w następujący sposób:
UIManager.put("FileChooser.saveButtonText", "Zapisz");
UIManager.put("FileChooser.openButtonText", "Otworz");
UIManager.put("FileChooser.cancelButtonText", "Anuluj");
UIManager.put("FileChooser.updateButtonText", "Modyfikuj");
UIManager.put("FileChooser.helpButtonText", "Pomoc");
UIManager.put("FileChooser.fileNameLabelText", "Nazwa pliku:");
UIManager.put("FileChooser.filesOfTypeLabelText", "Pliki typu:");
UIManager.put("FileChooser.upFolderToolTipText", "do góry o jeden poziom");
UIManager.put("FileChooser.homeFolderToolTipText", "Folder domowy");
UIManager.put("FileChooser.newFolderToolTipText", "Utwórz nowy folder");
UIManager.put("FileChooser.listViewButtonToolTipText", "Lista");
UIManager.put("FileChooser.detailsViewButtonToolTipText", "Szczegóły");
//I teraz dopiero wywołujemy nasze JFileChooser
JFileChooser wyborPliku = new FileChooser();
Aby dodawać komentarze musisz być zalogowany!
