United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6417110 : various GTK LAF problems

Details
Type:
Bug
Submit Date:
2006-04-24
Status:
Open
Updated Date:
2011-04-28
Project Name:
JDK
Resolved Date:
Component:
client-libs
OS:
linux
Sub-Component:
javax.swing
CPU:
x86
Priority:
P4
Resolution:
Unresolved
Affected Versions:
6
Targeted Versions:

Related Reports
Relates:
Relates:
Relates:
Relates:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b81)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-beta2-b81, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux helium 2.6.12-10-amd64-generic #1 Sat Mar 11 16:15:30 UTC 2006 x86_64 GNU/Linux


A DESCRIPTION OF THE PROBLEM :
I'm impressed by the GTK LAF improvements in Java 6, but see that there are still lots of problems. I've written a Java equivalent of the GNOME "The Widget Factory" to make it easier to compare native GTK+ and the Java GTK LAF side-by-side. See http://elliotth.blogspot.com/2006/04/gtk-laf-in-java-6.html for details and screenshots.

Here, for your convenience, are the problems I listed in the blog post, which are visible from JavaWidgetFactory:

* All four corners of the editable combo box are wrong. The left corners should be rounded rather than "snapped", and the right corners should join into the button (which shouldn't be rounded on its left edge). [6292725]

* The focus ring on the editable text components is wrong, but you can't see that from the screenshots. [6292725]

* The spinner's buttons are too narrow, and the right edge of the text area should be flush with the left edge of the button area. (The button area's edge is correct, so it looks like they're working on this.) [6292725]

* The enabled toggle button's rollover color is wrong (it should be a solid color rather than the standard button rollover gradient), but you can't see that from the screenshots. [6462825]

* All disabled text components/subcomponents have the wrong border and background.
[6292725]

* The non-editable combo box is completely wrong. The wrong icon is used, there should be just a subtle groove between the text and the icon, and the whole thing should be rendered in a button-like style. [4911497]

* The preferred size of JProgressBar doesn't match its native equivalent,
and the foreground of vertical JProgressBars is not rendered properly [6490642].

* JSlider doesn't render the two sides of the slider in different colors like its native equivalent [6490646].

* JSlider always has a text label, unlike its native equivalent. [6465237]

* JTable's header is rendered incorrectly, seemingly using the button renderer.
[6354793]

* JTable's rows are rendered incorrectly, but you can't see that from the screenshots.

* JScrollPane doesn't contain a table in the GTK way; the scrollbar should fill the top right corner. [6432013]

* JScrollPane doesn't seem to render unneeded scrollbars correctly, though GNOME seems to prescribe as-needed behavior, so this is perhaps an application error rather than a LAF problem. [6432013]

* JTabbedPane's tabs are slightly wrong. There's a single-pixel glitch at the start of each row of tabs, there are two dark gray lines between tabs rather than one, there are white lines on edges that shouldn't have them (at most one edge on a tab should have a white line; Java has one or two too many, depending on orientation).
[6354790]

Here are additional problems not mentioned in the blog post:

* JColorChooser's "OK" and "Cancel" buttons should be like JFileChooser's in GTK LAF. (Though see below for problems with JFileChooser's buttons; basically, there should be some kind of button factory so that all Swing's dialogs get the same buttons, and this kind of bug only needs fixing once, in one place.)

* JColorChooser's "Reset" button should be removed. It's wrong in the GTK, Windows, and Mac OS LAFs, so should either be removed altogether, or there should be a UIManager property so that Metal can explicitly ask for it to be present. [5012452, 4943902]

* JColorChooser shouldn't have the preview area in the GTK LAF.

* JFileChooser (and, hopefully soon, JColorChooser) "OK" and "Cancel" buttons should have equal widths. [5012459]

* At the moment, you can setBorder(null) on most LAF's JTextField instances, but it has no visible effect on a GTK JTextField. (This prevents the obvious work-around for the current problems with disabled text fields in the GTK LAF.)

* The GTK LAF shouldn't use lightweight popups going forward because they won't have the shadows they should have when there's a compositing manager. PopupFactory either needs changing, or the GTK LAF needs to install a custom PopupFactory. (Apple's LAF also has this problem, where tooltips must always be heavyweight to get the system's shadow under them.)

* The selected cell background in a JList with the GTK LAF should use the same gradient as tree.

* JTree (and JList) selection should be rendered differently when the window is and is not focused.

* JTable rows should alternate color (including in the "gap" below the rows, if the JTable is in a scroll pane). At the moment, the default is the GTK theme's even-row color, but it should probably be the even-row color because that's lighter/white in the most common themes. The current dark background to the rows makes JTable look like it's disabled or not rendering the background in some way.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* Download my "salma-hayek" library from http://software.jessies.org/salma-hayek/.

* Build it (Java 6 and GNU make 3.81 required).

* Run "java -cp classes e.tools.JavaWidgetFactory" (preferably side-by-side with the GTK original from http://www.stellingwerff.com/?page_id=10).

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
In an ideal world, the GTK LAF components should look and feel exactly like their native counterparts.
ACTUAL -
See description.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Source downloadable from link above.
---------- END SOURCE ----------

                                    

Comments
EVALUATION

Updated description for JScrollPane/JScrollBar issues to refer to 6432013.
Updated description for JTabbedPane issue to refer to 6354790.
Updated description for JTable header issue to refer to 6354793.
                                     
2006-11-14
EVALUATION

Updated description for JProgressBar issues to refer to 6490642.
                                     
2006-11-07
EVALUATION

Updated description for JSlider to refer to 6490646.
                                     
2006-11-07
EVALUATION

Updated a number of items in the description field to refer to 6292725, since
that bug will address a number of reported issues with spinners, comboboxes,
and textfields.
                                     
2006-10-11
EVALUATION

We're slowly filing individual bug reports for each of the issues mentioned
in the description above, and we're noting the bug id in brackets after each
issue.  Once we have bug reports filed for all these issues, we can close this
umbrella bug.
                                     
2006-08-29



Hardware and Software, Engineered to Work Together