Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6642612
Votes 0
Synopsis JFileChooser approve buttons should use Open and Save text (GTK)
Category java:classes_swing
Reported Against
Release Fixed 7(b27)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 17-DEC-2007
Description
FULL PRODUCT VERSION :
$ java -version
java version "1.6.0_02-ea"
Java(TM) SE Runtime Environment (build 1.6.0_02-ea-b02)
Java HotSpot(TM) Server VM (build 1.6.0_02-ea-b02, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux crux 2.6.18-5-686-bigmem #1 SMP Wed Oct 3 01:22:56 UTC 2007 i686 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
The text in the approve buttons for JFileChooser (in the GTK L&F at
least) should be Open for showOpenDialog and Save for showSaveDialog,
not just OK.

The buttons should also be the same size.

There are, of course, many, many differences with the current GTK file
chooser dialog, but that's enough for this report.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run attached program (you need the Swing Application Framework, JSR 296).
Cancel dialogs that appear.
View approve button to the right of the Cancel button.


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.JFileChooser;

import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;

public class GtkJFileChooserApproveButtonBug extends SingleFrameApplication {

    public GtkJFileChooserApproveButtonBug() {
    }

    @Override
    protected void startup() {
        new JFileChooser().showOpenDialog(null);
        new JFileChooser().showSaveDialog(null);
    }

    public static void main(String args[]) {
        Application.launch(GtkJFileChooserApproveButtonBug.class, args);
    }
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
You would think that calling

fileChooser.setApproveButtonText("Open");

for example, would set the text to Open, but it does not.
Posted Date : 2007-12-17 13:13:27.0
Work Around
N/A
Evaluation
We have to do "Ok" and "Cancel" buttuns with the same size.
Posted Date : 2007-12-29 10:48:49.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang