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: 6417110
Votes 3
Synopsis various GTK LAF problems
Category java:classes_swing
Reported Against
Release Fixed
State 3-Accepted, bug
Priority: 4-Low
Related Bugs 6292725 , 6354790 , 6354793 , 6432013 , 6462825 , 6465237 , 6490642 , 6490646
Submit Date 24-APR-2006
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 ----------
Posted Date : 2006-11-14 03:55:34.0
Work Around
N/A
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.
Posted Date : 2006-08-29 02:21:57.0

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.
Posted Date : 2006-10-11 00:40:06.0

Updated description for JProgressBar issues to refer to 6490642.
Posted Date : 2006-11-07 03:32:47.0

Updated description for JSlider to refer to 6490646.
Posted Date : 2006-11-07 03:50:48.0

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.
Posted Date : 2006-11-14 03:55:34.0
Comments
  
  Include a link with my name & email   

Submitted On 23-MAR-2007
wohler
I thought the disabled combo boxes looked funky!

I just submitted a bug report for the setBorder(null) problem. In addition to setEnabled(false) making the borders going away, setEditable(false) should also make the borders 


Submitted On 23-MAR-2007
wohler
...go away and set the background to gray (the same as the label, for example).

I echo the sentiments of the OP--the GTK look and feel looks much better and fixing these issues will make it nearly perfect. Thanks!


Submitted On 09-JAN-2008
lemmy01
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6624717
is missing by Related Bugs.


Submitted On 20-DEC-2008
bculp2000
its 2009 and most of these issues still exist.

Thats 3 years to fix a few L&F bugs.  Please get on this.


Submitted On 21-MAY-2009
Three years later and ... But actually the thing that really gets me is that Sun's Solaris is going with the Gnome desktop which uses GTK+ and so you'd think this would be a higher priority.



PLEASE NOTE: JDK6 is formerly known as Project Mustang